OCB3
Offset Codebook mode v3 (RFC 7253), a parallel AES-based AEAD with a 128-bit tag
Overview
OCB3 is the third version of the Offset Codebook authenticated encryption mode, specified for AES in RFC 7253. It runs roughly one block cipher call per block, can process blocks in parallel, and produces a 16-byte tag. NextSSL carries AES-128, AES-192 and AES-256 variants.
OCB is an authenticated encryption mode designed by Phillip Rogaway and Ted Krovetz. Version 3 is specified in RFC 7253 and uses an offset that changes from block to block, so each block costs one block cipher call plus a small amount of XOR work, and blocks can be processed in parallel.
NextSSL carries aes-128-ocb3, aes-192-ocb3 and aes-256-ocb3, each with a 16-byte tag. Nonces may be from 1 to 15 bytes, which is more flexible than the 12-byte nonce used by GCM. A nonce must still never repeat under the same key, since reuse breaks both privacy and authenticity.
The archive tier for these entries is unverified, even though the mode itself is specified in an RFC. The tier reflects NextSSL's own review status, so the RFC text and independent analysis should be consulted for the mode's guarantees.
History
2011–2021OCB3 presented by Krovetz and Rogaway at FSE
Specified for AES in RFC 7253
OCB chosen for the CAESAR final portfolio
OCB patents placed in the public domain
How it works
- The key and nonce derive an initial offset, and the offset is updated for each block.
- Each plaintext block is XORed with the offset, encrypted with AES, and XORed with the offset again.
- Associated data and the final block are folded into a checksum that produces the 16-byte tag.
Security notes
The mode is specified in RFC 7253, but NextSSL marks it unverified. Reusing a nonce with the same key breaks both confidentiality and integrity, so nonce uniqueness must be enforced.
Typical uses
Variants in NextSSL
3| Algorithm | Tier | Sizes (bytes) | Standards | API |
|---|---|---|---|---|
| AES-128-OCB3 aes-128-ocb3 |
unverified | key 16 · nonce 1–15 · tag 16 | RFC 7253 | root |
| AES-192-OCB3 aes-192-ocb3 |
unverified | key 24 · nonce 1–15 · tag 16 | RFC 7253 | root |
| AES-256-OCB3 aes-256-ocb3 |
unverified | key 32 · nonce 1–15 · tag 16 | RFC 7253 | root |
Frequently asked questions
What is OCB3?
OCB3 is the third version of the Offset Codebook AEAD mode, specified for AES in RFC 7253 and carried by NextSSL with AES-128, AES-192 and AES-256 variants.
Is OCB3 secure and post-quantum?
The mode is specified in RFC 7253, although NextSSL marks it unverified. As with other AES modes, the 256-bit key variant gives the best margin against Grover's quantum key search.
What key and nonce sizes does OCB3 use?
Keys are 16, 24 or 32 bytes depending on the AES variant, nonces are 1 to 15 bytes, and the tag is 16 bytes.
Which OCB3 variants does NextSSL include?
NextSSL registers 3 OCB3 variants: aes-128-ocb3, aes-192-ocb3, aes-256-ocb3.
Other authenticated encryption
All 392Related
CBC-MAC then counter-mode encryption with AES (NIST SP 800-38C, RFC 3610)
AES-EAXTwo-pass AEAD combining AES-CTR with OMAC (CMAC) authentication
AES-GCMCounter-mode AES with a GHASH polynomial MAC; the default AEAD of TLS and IPsec
AES-GCM-SIVNonce-misuse-resistant AES mode using POLYVAL and synthetic IVs (RFC 8452)
AES-SIVDeterministic authenticated encryption from CMAC-based S2V and AES-CTR (RFC 5297)