Authenticated encryption

AES-128-OCB3

Offset Codebook mode v3 (RFC 7253), a parallel AES-based AEAD with a 128-bit tag

unverified Root API only
Unverified tier.

Source found and wired, correctness not fully proven. Root API only. Reach it with NextSSL(root=True) in Python or the nextssl_root_* functions in C.

About AES-128-OCB3

AES-128-OCB3 is one of 3 OCB3 variants in the NextSSL registry, an authenticated encryption (AEAD) scheme. It uses a 16-byte (128-bit) key, a 1–15-byte nonce and a 16-byte (128-bit) authentication tag. Its registry entry cites RFC 7253. NextSSL lists it in the unverified tier and exposes it through the root API only (NextSSL(root=True) in Python, nextssl_root_* in C).

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–2021
  1. OCB3 presented by Krovetz and Rogaway at FSE

  2. Specified for AES in RFC 7253

  3. OCB chosen for the CAESAR final portfolio

  4. OCB patents placed in the public domain

How it works

  1. The key and nonce derive an initial offset, and the offset is updated for each block.
  2. Each plaintext block is XORed with the offset, encrypted with AES, and XORed with the offset again.
  3. 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

AES-based AEAD on hardware with fast AES instructionsProtocols that need flexible nonce lengths and a 128-bit tagComparisons with GCM and CCM in research

Sizes

FieldBytesMeaning
key16Secret key
nonce1 – 15Nonce / IV
tag16Authentication tag

Use it

from nextssl_demo import NextSSL

root = NextSSL(root=True)   # tier 'unverified' is reachable from the root API only
key, nonce = root.random(16), root.random(1)
ct = root.call("aead_seal", "aes-128-ocb3", None, key, nonce, b"header", b"secret")[0]   # ct || tag
pt = root.call("aead_open", "aes-128-ocb3", None, key, nonce, b"header", ct)[0]

Calls follow the NextSSL C ABI and its language bindings. Buffer sizes are validated against the sizes above.

Other OCB3 variants

2

Frequently asked questions

What is AES-128-OCB3?

AES-128-OCB3 is an AEAD in the OCB3 family. OCB3 is the third version of the Offset Codebook authenticated encryption mode, specified for AES in RFC 7253.

What are the AES-128-OCB3 sizes?

In NextSSL, AES-128-OCB3 uses: key 16 bytes, nonce 1 to 15 bytes, tag 16 bytes.

Who designed AES-128-OCB3 and when?

AES-128-OCB3 belongs to the OCB3 family, first published in 2011 by Phillip Rogaway, Ted Krovetz. Its origin: RFC 7253.

Which standards define AES-128-OCB3?

AES-128-OCB3 is referenced by RFC 7253.

Is AES-128-OCB3 safe to use?

AES-128-OCB3 is in the unverified tier. Source found and wired, correctness not fully proven. Root API only. It is only reachable through the root API (NextSSL(root=True) in Python, nextssl_root_* in C).

What other OCB3 variants are there?

NextSSL also registers aes-192-ocb3, aes-256-ocb3 in the OCB3 family.