cryptography - should you authenticate the initialization vector in ipsec? -


i'm trying implement ipsec in form of esp in transport mode using aes in galois/counter mode, according rfc4106.

i'm supposed put initialization vector before ciphertext in transformed packet.

should part of authenticated (but non-encrypted) data? (i'm assuming don't encrypt it...)

i can't see rfc specifies this. should obvious , if why?

as far understand gcm definition, there no need include initialization vector in associated data - using different initialization vectors give both different encryption results different integrity check value anyway.

this advantage of using combined authenticated-encryption mode, don't have care including initialization vectors in mac.

so, encode packet esp gcm, this:

  • fetch key
  • generate iv
  • calculate associated data (from spi , sequence number)
  • get plaintext
  • pass iv, associated data, key, plaintext gcm algorithm
  • get ciphertext , icv gcm algorithm
  • send iv, ciphertext , icv

Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -