Windows 相当于 OS X 钥匙串?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/442923/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Windows equivalent of OS X Keychain?
提问by dF.
Is there an equivalent of the OS X Keychain, used to store user passwords, in Windows? I would use it to save the user's password for a web service that my (desktop) software uses.
在 Windows 中是否有等效的 OS X Keychain,用于存储用户密码?我会用它来保存我的(桌面)软件使用的网络服务的用户密码。
From the answers to this related question (Protecting user passwords in desktop applications (Rev 2)) and the multitude of third party password storage toolsavailable, I assume that such a thing doesn't exist-- Am I stuck with either asking for the password each time I access the web service, or just storing it obfuscated?
从这个相关问题的答案(保护桌面应用程序中的用户密码(修订版 2))和众多可用的第三方密码存储工具来看,我认为这样的事情不存在——我是否坚持要求每次访问网络服务时都输入密码,还是只是将其存储混淆?
采纳答案by Josh Kelley
The "traditional" Windows equivalent would be the Protected Storage subsystem, used by IE (pre IE 7), Outlook Express, and a few other programs. I believe it's encrypted with your login password, which prevents some offline attacks, but once you're logged in, any program that wants to can read it. (See, for example, NirSoft's Protected Storage PassView.)
IE(IE 7 之前)、Outlook Express 和一些其他程序使用的“传统”Windows 等效项是 Protected Storage 子系统。我相信它是用您的登录密码加密的,可以防止一些离线攻击,但是一旦您登录,任何想要读取它的程序都可以读取它。(例如,参见 NirSoft 的Protected Storage PassView。)
Windows also provides the CryptoAPI and Data Protection API that might help. Again, though, I don't think that Windows does anything to prevent processes running under the same account from seeing each other's passwords.
Windows 还提供了可能有帮助的 CryptoAPI 和数据保护 API。不过,我不认为 Windows 会采取任何措施来阻止在同一帐户下运行的进程看到彼此的密码。
It looks like the book Mechanics of User Identification and Authenticationprovides more details on all of these.
看起来用户识别和身份验证机制一书提供了所有这些的更多细节。
Eclipse (via its SecureStoragefeature) implements something like this, if you're interested in seeing how other software does it.
回答by Mikser
It is year 2018, and Windows 10 has a "Credential Manager" that can be found in "Control Panel"
现在是 2018 年,Windows 10 有一个“凭据管理器”,可以在“控制面板”中找到
回答by jordanbtucker
Windows 8 has a notion of a keychain called Password Vault. Windows Runtime apps (Modern/Metro) as well as managed desktop apps can make use of it. According to the documentation:
Windows 8 有一个称为密码保险箱的钥匙串概念。Windows 运行时应用程序(现代/Metro)以及托管桌面应用程序可以使用它。根据文档:
Apps and services don't have access to credentials associated with other apps or services.
应用程序和服务无权访问与其他应用程序或服务关联的凭据。
See How to store user credentialson MSDN.
Pre-Windows 8, Data Protection API(DPAPI) is the closest equivalent to a keychain. Arbitrary data can be encrypted using this API, although storing the encrypted data is up to the developer. The data is ultimately encrypted using the current user's password, however user or developer supplied "optional entropy" could be included to further protect the data from other software or users. The data can also be decrypted on different computers in a domain.
在 Windows 8 之前,数据保护 API(DPAPI) 与钥匙串最接近。可以使用此 API 加密任意数据,但存储加密数据取决于开发人员。数据最终使用当前用户的密码进行加密,但是可以包括用户或开发人员提供的“可选熵”,以进一步保护数据免受其他软件或用户的侵害。数据也可以在域中的不同计算机上解密。
DPAPI can be accessed through native calls to Crypt32.dll's CryptProtectDataand CryptUnprotectDatafunctions or through .NET Framework's ProtectedDataclass, which is a limited feature wrapper for the former functions.
DPAPI 可以通过对 Crypt32.dll 的CryptProtectData和CryptUnprotectData函数的本机调用或通过 .NET Framework 的ProtectedData类访问,后者是前一个函数的有限功能包装器。
More information than you ever needed to know about DPAPI is available in Passcape's article DPAPI Secrets. Security analysis and data recovery in DPAPI.
在 Passcape 的文章DPAPI Secrets 中提供了比您需要了解的更多关于 DPAPI 的信息。DPAPI 中的安全分析和数据恢复。
回答by jims
Actually, looking through MSDN, the functions they recommend using (instead of Protected Storage) are:
实际上,通过 MSDN,他们推荐使用的功能(而不是 Protected Storage)是:
CryptProtectData
CryptUnprotectData
CryptProtectData
CryptUnprotectData
The link for CryptProtectData
is at CryptProtectData function.
链接CryptProtectData
位于CryptProtectData 函数。
回答by Mohit
OS X keychain equivalent is Credential Managerin windows.
OS X 钥匙串等效于 Windows 中的凭据管理器。