From c03a7ad8444d0d536bb37fe2fdf88f3721b954db Mon Sep 17 00:00:00 2001 From: Marian Beermann Date: Sat, 18 Feb 2017 00:01:16 +0100 Subject: [PATCH] docs: datas: enc: 1.1.x mas different MACs --- docs/internals/data-structures.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/internals/data-structures.rst b/docs/internals/data-structures.rst index 8a40fb720..f139a02a3 100644 --- a/docs/internals/data-structures.rst +++ b/docs/internals/data-structures.rst @@ -438,12 +438,12 @@ Encryption .. seealso:: The :ref:`borgcrypto` section for an in-depth review. AES_-256 is used in CTR mode (so no need for padding). A 64 bit initialization -vector is used, a `HMAC-SHA256`_ is computed on the encrypted chunk +vector is used, a MAC is computed on the encrypted chunk and both are stored in the chunk. -The header of each chunk is: ``TYPE(1)`` + ``HMAC(32)`` + ``NONCE(8)`` + ``CIPHERTEXT``. -Encryption and HMAC use two different keys. +The header of each chunk is: ``TYPE(1)`` + ``MAC(32)`` + ``NONCE(8)`` + ``CIPHERTEXT``. +Encryption and MAC use two different keys. -In AES CTR mode you can think of the IV as the start value for the counter. +In AES-CTR mode you can think of the IV as the start value for the counter. The counter itself is incremented by one after each 16 byte block. The IV/counter is not required to be random but it must NEVER be reused. So to accomplish this |project_name| initializes the encryption counter to be