Как AESCBC128 / 258 работает в TLS1.0 - PullRequest
0 голосов
/ 30 января 2020

Недавно я изучаю протокол TLS 1.0 / 1.1 / 1.2. Я заметил, что AESCBC128 / 256 может использоваться для TLS 1.0, хотя это не упоминается в начальном TLS1.0 RF C. Мне интересно, как AESCB C IV / соль обменивается между клиентом и сервером? Это то же самое, что TLS 1.2, который всегда обменивается IV в данных приложения (первые 16 байтов данных)? Если какие-либо официальные материалы опишут это было бы благодарно.

1 Ответ

1 голос
/ 30 января 2020

TLS_RSA_WITH_AES_128_CBC_SHA является обязательным для реализации в TLS 1.2 (см. RF C 5246).

В разделе §6.2.3.2 объясняется, как работает CB C:

Для блочных шифров (таких как 3DES или AES) функции шифрования и MAC преобразуют структуры TLSCompressed.fragment в и из блочных структур TLSCiphertext.fragment.

  struct {
      opaque IV[SecurityParameters.record_iv_length];
      block-ciphered struct {
          opaque content[TLSCompressed.length];
          opaque MAC[SecurityParameters.mac_length];
          uint8 padding[GenericBlockCipher.padding_length];
          uint8 padding_length;
      };
  } GenericBlockCipher;

MA C генерируется, как описано в Раздел 6.2.3.1.

Шифрованные комплекты AES были введены RF C 3268 в июне 2002 года, следовательно, для TLS до 1.2. Обратите особое внимание на это:

Cipher Usage

The new ciphersuites proposed here are very similar to the following,
defined in [TLS]:

TLS_RSA_WITH_3DES_EDE_CBC_SHA
TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA
TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA
TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA
TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
TLS_DH_anon_WITH_3DES_EDE_CBC_SHA

All the ciphersuites described here use the AES in cipher block
chaining (CBC) mode.  Furthermore, they use SHA-1 [SHA-1] in an HMAC
construction as described in section 5 of [TLS].  (Although the TLS
ciphersuite names include the text "SHA", this actually refers to the
modified SHA-1 version of the algorithm.)

Если вы сейчас посмотрите на раздел §6.2.3.2 RF C 2246 (TLS 1.0 и, следовательно, также 1.1), вы можете прочитать это:

   Note: With block ciphers in CBC mode (Cipher Block Chaining) the
   initialization vector (IV) for the first record is generated with
   the other keys and secrets when the security parameters are set.
   The IV for subsequent records is the last ciphertext block from
   the previous record.

В глоссарии также сказано:

cipher block chaining (CBC)
   CBC is a mode in which every plaintext block encrypted with a
   block cipher is first exclusive-ORed with the previous ciphertext
   block (or, in the case of the first block, with the
   initialization vector). For decryption, every block is first
   decrypted, then exclusive-ORed with the previous ciphertext block
   (or IV).
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...