PasswordVault security when used from Desktop app

后端 未结 4 561
执念已碎
执念已碎 2020-12-15 19:19

I\'d like to use Windows.Security.Credentials.PasswordVault in my desktop app (WPF-based) to securely store a user\'s password. I managed to access this Windows 10 API using

4条回答
  •  暖寄归人
    2020-12-15 19:59

    Only alternative is to encrypt password with your own private key stored somewhere in your code. (Someone can easily disassemble your code and get the key) and then store encrypted password inside PasswordVault, however the only security you have is any app will not have access to password.

    This is dual security, in case of compromised machines, attacker can get access to PasswordVault but not your password as they will need one more private key to decrypt the password and that will be hidden somewhere in your code.

    To make it more secure, if you leave your private key on your server and expose an API to encrypt and decrypt password before storing in Vault, will make it most secure. I think this is the reason people have moved on to OAuth (storing OAuth token in PasswordVault) etc rather then storing password in vault.

    Ideally, I would recommend not storing password, instead get some token from server and save it and use that token for authentication. And store that token in PasswordVault.

提交回复
热议问题