Lably
Skip to content

OCB mode

Authenticated encryption mode of operation for block ciphers

  • 3 min read
  • 4 chapters

Related on Lably

Through Privacy

Encryption and authentication

OCB mode was designed to provide both message authentication and privacy. It is essentially a scheme for integrating a message authentication code (MAC) into the operation of a block cipher. In this way, OCB mode avoids the need to use two systems: a MAC for authentication and encryption for confidentiality. This results in lower computational cost compared to using separate encryption and authentication functions.

There are three versions of OCB: OCB1, OCB2 and OCB3. OCB1 was published in 2001. OCB2 improves on OCB1 by allowing associated data to be included with the message, providing authenticated encryption with associated data (AEAD; that is, data that are not encrypted but should be authenticated) and a new method for generating a sequence of offsets. OCB2 was first published in 2003, originally named authenticated-encryption mode, or advanced encryption mode (AEM) and was shown to be completely insecure in 2019. OCB3, published in 2011, changes again the way offsets are computed and introduces minor performance improvements.

OCB2 was standardized in ISO/IEC 19772:2009 (although it was removed from the standard following the publication of the attack) and a modified OCB3 in RFC 7253. The RFC encodes the tag length into the internally formatted nonce.

Sign in to keep reading

3 more chapters are free with a Lably account.

More in Computing and communication