提供的恢复密码格式无效 0x80310035

提供的恢复密码格式无效 0x80310035

我正在自动安装 BitLocker。作为此任务的一部分,正在添加恢复密码。我不想使用自动生成的密码,而是想提供自己的密码。但是,并非所有密码组合似乎都有效。

此命令行失败

Add-BitLockerKeyProtector -MountPoint D -RecoveryPasswordProtector -RecoveryPassword '123456-123456-123456-123456-123456-123456-123456-123456'

虽然此命令行运行正常

Add-BitLockerKeyProtector -MountPoint D -RecoveryPasswordProtector -RecoveryPassword '531058-303050-716078-383614-460922-106975-083446-139161'

我收到的错误消息如下

Add-RecoveryPasswordProtectorInternal : The format of the recovery password provided is invalid.
BitLocker recovery passwords are 48 digits.
Verify that the recovery password is in the correct format and then try again.
(Exception from HRESULT: 0x80310035) At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\BitLocker\BitLocker.psm1:2052 char:31
+ ...   $Result = Add-RecoveryPasswordProtectorInternal $BitLockerVolumeInt ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : NotSpecified: (:) [Write-Error], COMException
+ FullyQualifiedErrorId : System.Runtime.InteropServices.COMException,Add-RecoveryPasswordProtectorInternal

有人知道是什么使得这样的密码有效吗?

答案1

有人知道是什么使得这样的密码有效吗?

每个 6 位数字的块必须能被 11 整除。系统完整性团队博客中有一篇文章解释了原因:

创建恢复密码时,我们先使用一个随机的 128 位密钥,然后将其分成 8 组,每组 16 位。每组包含 16 位熵,可以写成 0 到 (2^16 - 1) 之间的值。我们取此值并将其乘以 11。现在描述的值的范围是 0 到 11 x (2^16 - 1)(0 到 720885)。请注意,输出中只有 11 个现在是“有效”值。我们用零填充,并将其写成六位数。此值仍然包含原始的 16 位熵,但现在分布在更大的范围内。我们对其他七个块重复此过程,生成一个 48 位密码。

当用户输入密钥时,我们每次接受 6 位数字,然后检查他们刚输入的数字是否能被 11 整除。如果能,那么我们知道它可能是密钥的一部分 - 如果不是,那么我们肯定知道它不是有效块。这可以防止数字互换、数字输入错误等,我们可以安全地向用户报告输入错误。

来源BitLocker 恢复密码详细信息 – 系统完整性团队博客

相关内容