VeraCrypt文档-加密方案

Encryption Scheme

加密方案

When mounting a VeraCrypt volume (assume there are no cached passwords/keyfiles) or when performing pre-boot authentication, the following steps are performed:

当装载VeraCrypt卷(假设没有缓存的密码/密钥文件)或执行预启动身份验证时,将执行以下步骤:

  1. The first 512 bytes of the volume (i.e., the standard volume header) are read into RAM, out of which the first 64 bytes are the salt (see VeraCrypt Volume Format Specification). For system encryption (see the chapter System Encryption), the last 512 bytes of the first logical drive track are read into RAM (the VeraCrypt Boot Loader is stored in the first track of the system drive and/or on the VeraCrypt Rescue Disk).

    卷的前512个字节(即标准卷头)被读取到RAM中,其中前64个字节是salt(请参阅VeraCrypt卷格式规范)。对于系统加密(请参阅“系统加密”一章),第一个逻辑驱动器磁道的最后512字节被读取到RAM中(VeraCrypt引导加载程序存储在系统驱动器的第一个磁道或VeraCrypt-Recue Disk上)。
  2. Bytes 65536–66047 of the volume are read into RAM (see the section VeraCrypt Volume Format Specification). For system encryption, bytes 65536–66047 of the first partition located behind the active partition* are read (see the section Hidden Operating System). If there is a hidden volume within this volume (or within the partition behind the boot partition), we have read its header at this point; otherwise, we have just read random data (whether or not there is a hidden volume within it has to be determined by attempting to decrypt this data; for more information see the section Hidden Volume).

    卷的65536–66047字节被读取到RAM中(请参阅VeraCrypt卷格式规范一节)。对于系统加密,位于活动分区*后面的第一个分区的字节65536–66047将被读取(请参阅隐藏操作系统一节)。如果在这个卷内(或在引导分区后面的分区内)有一个隐藏的卷,我们此时已经读取了它的标头;否则,我们只读取随机数据(其中是否有隐藏卷必须通过尝试解密该数据来确定;有关更多信息,请参阅隐藏卷一节)。
  3. Now VeraCrypt attempts to decrypt the standard volume header read in (1). All data used and generated in the course of the process of decryption are kept in RAM (VeraCrypt never saves them to disk). The following parameters are unknown† and have to be determined through the process of trial and error (i.e., by testing all possible combinations of the following):

    现在VeraCrypt尝试解密(1)中读取的标准卷标头。解密过程中使用和生成的所有数据都保存在RAM中(VeraCrypt从不将其保存到磁盘)。以下参数未知†,必须通过试错过程(即通过测试以下所有可能的组合)来确定:
    1. PRF used by the header key derivation function (as specified in PKCS #5 v2.0; see the section Header Key Derivation, Salt, and Iteration Count), which can be one of the following:

      标头密钥派生函数使用的PRF(如PKCS#5 v2.0中所指定;请参阅“标头密钥派生、Salt和迭代计数”一节),它可以是以下之一:

      HMAC-SHA-512, HMAC-SHA-256, HMAC-RIPEMD-160, HMAC-Whirlpool. If a PRF is explicitly specified by the user, it will be used directly without trying the other possibilities.

      HMAC-SHA-512、HMAC-SHA-256、HMAC-RIPEMD-160、HMAC-Whirlpool。如果用户明确指定了PRF,则将直接使用它,而不尝试其他可能性。

      A password entered by the user (to which one or more keyfiles may have been applied – see the section Keyfiles), a PIM value (if specified) and the salt read in (1) are passed to the header key derivation function, which produces a sequence of values (see the section Header Key Derivation, Salt, and Iteration Count) from which the header encryption key and secondary header key (XTS mode) are formed. (These keys are used to decrypt the volume header.)

      用户输入的密码(可能应用了一个或多个密钥文件-请参阅密钥文件一节)、PIM值(如果指定)和读取的salt(1)被传递给头密钥推导函数,它产生一系列值(请参阅Header Key Derivation、Salt和Iteration Count一节),由此形成标头加密密钥和次标头密钥(XTS模式)。(这些密钥用于解密卷标头。)

    2. Encryption algorithm: AES-256, Serpent, Twofish, AES-Serpent, AES-Twofish- Serpent, etc.

      加密算法:AES-256、Serpent、Twofish、AES Serpent和AES Twofish-Serpent等。
       
    3. Mode of operation: only XTS is supported

      操作模式:仅支持XTS
       
    4. Key size(s)

      密钥大小
  4. Decryption is considered successful if the first 4 bytes of the decrypted data contain the ASCII string “VERA”, and if the CRC-32 checksum of the last 256 bytes of the decrypted data (volume header) matches the value located at byte #8 of the decrypted data (this value is unknown to an adversary because it is encrypted – see the section VeraCrypt Volume Format Specification). If these conditions are not met, the process continues from (3) again, but this time, instead of the data read in (1), the data read in (2) are used (i.e., possible hidden volume header). If the conditions are not met again, mounting is terminated (wrong password, corrupted volume, or not a VeraCrypt volume).

    如果解密数据的前4个字节包含ASCII字符串“VERA”,并且如果解密数据(卷头)的最后256个字节的CRC-32校验和与解密数据字节#8处的值匹配,则认为解密成功(此值对对手来说是未知的,因为它是加密的——请参阅VeraCrypt volume Format Specification一节)。如果不满足这些条件,则该过程再次从(3)继续,但这一次,使用在(1)中读取的数据,而不是在(2)中读取数据(即,可能的隐藏卷头)。如果再次不满足条件,装载将终止(密码错误、卷损坏或不是VeraCrypt卷)。
  5. Now we know (or assume with very high probability) that we have the correct password, the correct encryption algorithm, mode, key size, and the correct header key derivation algorithm. If we successfully decrypted the data read in (2), we also know that we are mounting a hidden volume and its size is retrieved from data read in (2) decrypted in (3).

    现在我们知道(或以非常高的概率假设)我们有正确的密码、正确的加密算法、模式、密钥大小和正确的头密钥推导算法。如果我们成功地解密了在(2)中读取的数据,我们也知道我们正在装载一个隐藏卷,并且它的大小是从在(3)中解密的在(2中读取的数据中检索的。
     
  6. The encryption routine is reinitialized with the primary master key** and the secondary master key (XTS mode – see the section Modes of Operation), which are retrieved from the decrypted volume header (see the section VeraCrypt Volume Format Specification). These keys can be used to decrypt any sector of the volume, except the volume header area (or the key data area, for system encryption), which has been encrypted using the header keys. The volume is mounted.

    使用主主密钥**和辅助主密钥(XTS模式-请参阅操作模式一节)重新初始化加密例程,这两个密钥是从解密的卷标头中检索的(请参阅VeraCrypt volume Format Specification一节)。这些密钥可用于解密卷的任何扇区,除了已使用头密钥加密的卷头区域(或用于系统加密的密钥数据区域)。卷已装入。

See also section Modes of Operation and section Header Key Derivation, Salt, and Iteration Count and also the chapter Security Model.

​另请参阅操作模式一节和标头密钥派生、Salt和迭代计数一节,以及安全模型一章。

* If the size of the active partition is less than 256 MB, then the data is read from the second partition behind the active one (Windows 7 and later, by default, do not boot from the partition on which they are installed).

*如果活动分区的大小小于256 MB,则从活动分区后面的第二个分区读取数据(默认情况下,Windows 7及更高版本不会从安装它们的分区启动)。

† These parameters are kept secret not in order to increase the complexity of an attack, but primarily to make VeraCrypt volumes unidentifiable (indistinguishable from random data), which would be difficult to achieve if these parameters were stored unencrypted within the volume header. Also note that in the case of legacy MBR boot mode, if a non-cascaded encryption algorithm is used for system encryption, the algorithm is known (it can be determined by analyzing the contents of the unencrypted VeraCrypt Boot Loader stored in the first logical drive track or on the VeraCrypt Rescue Disk).

†这些参数是保密的,不是为了增加攻击的复杂性,而是主要为了使VeraCrypt卷不可识别(与随机数据不可区分),如果这些参数未加密地存储在卷头中,这将很难实现。还要注意,在传统MBR引导模式的情况下,如果使用非级联加密算法进行系统加密,则该算法是已知的(可以通过分析存储在第一个逻辑驱动器轨道或VeraCrypt Rescue Disk上的未加密VeraCrypt-boot Loader的内容来确定)。

** The master keys were generated during the volume creation and cannot be changed later. Volume password change is accomplished by re-encrypting the volume header using a new header key (derived from a new password).

**主密钥是在创建卷期间生成的,以后无法更改。卷密码更改是通过使用新的标头密钥(源自新密码)重新加密卷标头来完成的。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
VeraCrypt 是 TrueCrypt 的分支,主要开发者是法国的 Mounir Idrassi,他在 TrueCrypt 基础上强化了防暴力免费功能。VeraCrypt 增强了用于系统和分区加密的算法的安全性,使其免受暴力免费攻击。VeraCrypt 还解决了TrueCrypt中发现的许多漏洞和安全问题。 开源磁盘加密工具 VeraCrypt 中文版开源磁盘加密工具 VeraCrypt 中文版 VeraCrypt 主要特点: 在文件中创建虚拟加密磁盘并将其作为实际磁盘安装。 加密整个分区或存储设备,如 USB 闪存驱动器或硬盘驱动器。 加密安装 Windows 的分区或驱动器(预启动身份验证)。 加密是自动的,实时的(即时)和透明的。 并行化和流水线操作允许读取和写入数据,就像驱动器未加密一样快。 加密可以在现代处理器上进行硬件加速。 如果对手强迫您泄露密码,则提供合理的拒绝:隐藏卷(隐写)和隐藏的操作系统。 VeraCrypt 是一个用于建立和维护动态加密卷(数据存储设备)的软件。即时加密意味着数据在保存之前就会自动加密,并在加载后立即解密,无需任何用户干预。如果不使用正确的密码/密钥文件或正确的加密密钥,则无法读取(解密)存储在加密卷上的数据。整个文件系统被加密(例如,文件名,文件夹名,每个文件的内容,空闲空间,元数据等)。 可以将文件复制到已安装的 VeraCrypt 卷中,也可以将其复制到任何普通磁盘上(例如,通过简单的拖放操作)。在从加密VeraCrypt 卷读取或复制文件时,文件会在运行中(在内存/RAM 中)自动解密。同样,正在写入或复制到 VeraCrypt 卷的文件会在 RAM 中自动加密(在它们写入磁盘之前)。请注意,这并不意味着要加密/解密的整个文件必须先存储在RAM中才能加密/解密。VeraCrypt 没有额外的内存(RAM)要求。有关如何完成此操作的说明,请参阅以下段落。 假设有一个 .avi 视频文件存储在 VeraCrypt 卷上(因此,视频文件是完全加密的)。用户提供正确的密码(和/或密钥文件)并安装(打开)VeraCrypt 卷。当用户双击视频文件的图标时,操作系统启动与文件类型相关联的应用程序 – 通常是媒体播放器。然后,媒体播放器开始将视频文件的一小部分初始部分从 VeraCrypt 加密卷加载到 RAM(存储器)以便播放它。在加载该部分时,VeraCrypt 会自动解密它(在 RAM 中)。然后,媒体播放器播放视频的解密部分(存储在 RAM 中)。在播放此部分时,媒体播放器开始将另一小部分视频文件从 VeraCrypt 加密卷加载到 RAM(内存),然后重复该过程。此过程称为动态加密/解密,适用于所有文件类型(不仅适用于视频文件)。 请注意,VeraCrypt 从不将任何解密数据保存到磁盘 – 它只将它们临时存储在 RAM(内存)中。即使安装了卷,存储在卷中的数据仍然是加密的。当您重新启动Windows或关闭计算机时,将卸除卷,并且将无法访问(并加密)存储在其中的文件。即使电源突然中断(没有正确的系统关闭),存储在卷中的文件也是不可访问(和加密)的。要使它们再次可访问,您必须装入卷(并提供正确的密码和/或密钥文件)。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值