Score:0

Why is IV in RFC8448 examples only 12 octets instead of 16?

kg flag

I am working on manual decryption of application data in TLS 1.3 by going through example in RFC8448. I successfully derived and expanded key and IV, but the IV in examples is only 12 bytes long instead of 16, which is required for AES-128-GCM.

Score:3
my flag

the IV in examples is only 12 bytes long instead of 16, which is required for AES-128-GCM.

That is incorrect; while GCM supports any nonce length, it is both simpler and more secure with 12 byte nonce length, hence that is what is used in almost all cases, including TLS 1.3.

fgrieu avatar
ng flag
Addition, for reference: IV requirements for GCM are [there](https://nvlpubs.nist.gov/nistpubs/legacy/sp/nistspecialpublication800-38d.pdf#%5B%7B%22num%22%3A34%2C%22gen%22%3A0%7D%2C%7B%22name%22%3A%22XYZ%22%7D%2C0%2C792%2Cnull%5D) and [there](https://nvlpubs.nist.gov/nistpubs/legacy/sp/nistspecialpublication800-38d.pdf#%5B%7B%22num%22%3A65%2C%22gen%22%3A0%7D%2C%7B%22name%22%3A%22XYZ%22%7D%2C0%2C792%2Cnull%5D). The later de facto recommends 12 bytes.
dave_thompson_085 avatar
cn flag
Moreover, rfc5116 section 5 specifies 12-byte nonce for AES-GCM _and_ AES-CCM _used on the Internet_, and rfc8446 section 5.3 specifies nonce is minimum 8-byte but otherwise determined by the cipher, referencing rfc5116 for GCM and CCM(16), rfc6655 for CCM8, and rfc8439 for chacha20/poly1305, the latter two also specifying 12-byte (aka 96-bit) nonce. So in short both TLS1.2 and TLS1.3 always use 12-byte nonce for AEAD including GCM.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.