- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我正在考虑使用 Windows 的数据保护 API (DPAPI) 来加密一些数据。我的一个要求是在加密值时使用动态盐。
我通过测试注意到,如果我多次加密同一个字符串,我会得到不同的结果。这是使用相同的字符串、空熵值和相同的范围。
这让我感觉好像已经包含了动态盐。我没有看到任何说明这一点的文档。
DPAPI 是否已经处理动态加盐?如果不是,是什么导致加密值每次都发生变化?
最佳答案
The MasterKey, however, is not used explicitly to protect the data. Instead, a symmetric session key is generated based on the MasterKey, some random data, and any additional entropy, if an application chooses to supply it. It is this session key that is used to protect the data.
[...]
The session key is never stored. Instead, DPAPI stores the random data it used to generate the key in the opaque data BLOB. When the data BLOB is passed back in to DPAPI, the random data is used to re-derive the key and unprotect the data.
https://msdn.microsoft.com/en-us/library/ms995355.aspx
加密数据中包含的随机数据充当盐。
optionalEntropy
参数的目的是允许各个应用程序保护自己免受同一用户帐户下运行的其他应用程序的影响,并且不需要提高已经执行的加盐的有效性。
关于c# - DPAPI 会自动执行 Dynamic Salt 吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54714462/
我们有一个 WPF 应用程序,允许用户下载加密内容,并且我们希望提供离线解密该内容的功能。我的想法是下载 key 并使用 DPAPI 存储它们,但我在使用熵参数时遇到了问题。 是否有任何方法可以生成熵
你们中有人知道 Data Protection API for WP7 中使用的是什么加密算法吗? ? 我已经阅读了一些 MSDN 和 Wikipedia关于此的文章,但其中大部分都集中在 Windo
我正在 Windows 8 上开发一个 c# .net 3.5 应用程序。 我需要使用 DPAPI 加密数据。它在我的所有机器上工作正常,除了一台机器出现以下异常:System.Security.Cr
我正在使用 Windows DPAPI 为我加密一些敏感数据。密码存储在注册表中。这一切都很好,但我想知道是否有人可以澄清我对 .NET 中(可选)提供给 ProtectedData.Protect(
在我的应用程序中,我需要加密各种设置和密码。到目前为止,我一直在使用 RijndaelManaged 类等进行此操作,如下所示: /// /// Encrypts the string define
我不知道为什么会出现以下错误,“必须声明一个主体,因为它没有标记为抽象、外部或部分”。我实际上遵循以下站点中的指南'http://www.overclock.net/t/1293731/windows
我目前正在尝试了解如何最好地在 .NET 4.0 C# 环境中实现签名/验证。 我的要求是能够作为一个“用户”在我的系统中签署数据,在稍后的某个时候,该数据需要由消费者验证。 为了实现这一点,我正在尝
我在 C++ 中使用 DPAPI 来加密我需要存储在文件中的一些数据。问题是我需要从 C# 读取该文件,所以我需要能够: C++ 加密,C++ 解密(运行良好) C# 加密,C# 解密(运行良好) C
我正在使用 DPAPI 来存储 XML 数据。 CryptProtectData 之后的数据存储在一个文件中。在我的一个用例中,需要在任何用户登录到工作站之前解密此数据。因为,我不能在这里使用用户特定
所以我正在尝试使用 DPAPI 存储对称 key 。一切都很好,但是如何处理熵呢?这回答了问题 here确实没有提供足够的洞察力。这似乎是一个湿滑的斜坡——我可以使用机器商店来存储熵,但是是什么阻止了
我正在尝试找到在 Ubuntu Server 20.04 上存储 secret (供我的应用程序使用)的解决方案。我过去曾使用 Windows 的 DPAPI 来存储 secret ,使用访问 API
有没有比 Windows DPAPI 更安全的方式来保护和存储密码? 我的程序需要存储一个 secret (类似于凭据)以在 Windows 上进行自动登录,并且这个 secret 必须与其他用户帐户
假设有人可以访问我的所有硬盘,我猜弱点就是我的 Windows 密码。在不知道/无法检索的情况下,数据应该非常安全,不是吗? 我特地询问是因为 EFS entry在维基百科中指出 In Windows
我目前正在编写一个 c# mvc web 应用程序,其中从用户那里获取密码并将其存储在数据库 - sql server 中。我需要一种散列密码的方法。 建议使用数据保护 API (DPAPI)。我不熟
假设我加密数据并将其写入如下文件: byte[] encrypted = ProtectedData.Protect(plain, null, DataProtectionScope.Curr
有没有办法通过 Python 在 Windows XP 上使用 DPAPI(数据保护应用程序编程接口(interface))? 如果有可以做到的模块,我宁愿使用现有的模块。不幸的是,我无法通过 Goo
我们即将使用 DPAPI 来加密 ASP.NET 网络配置文件中的连接字符串。但是我对我们的网络集群(场)使用 RSA 还是 DPAPI 感到困惑。以下 MSDN 链接清楚地表明,如果我们想在网络场上
我正在考虑使用 Windows 的数据保护 API (DPAPI) 来加密一些数据。我的一个要求是在加密值时使用动态盐。 我通过测试注意到,如果我多次加密同一个字符串,我会得到不同的结果。这是使用相同
我正在使用 DPAPI(Data Protector API)来保护和取消保护数据。我正在从文件中读取数据。 C:\Users\nandkishore.sharma\AppData\Local\Goo
我关于 VBA 的初学者系列问题中的另一个。 我正在用 VBA 编写 Excel 插件,插件使用本地配置文件。 该文件需要包含远程服务的密码。 显然,将此密码存储为明文并不理想。但我正在寻找一种可以编
我是一名优秀的程序员,十分优秀!