Stream ciphers

AES-128-OFB

Output Feedback mode: a synchronous stream cipher from repeatedly encrypting the IV

standard Safe API Specified in a FIPS standard

About AES-128-OFB

AES-128-OFB is one of 3 AES-OFB variants in the NextSSL registry, a stream cipher. It uses a 16-byte (128-bit) key and a 16-byte nonce. Its registry entry cites NIST SP 800-38A. It is also known as aes128-ofb. NextSSL lists it in the standard tier and exposes it through the safe API.

Overview

OFB (Output Feedback) is a block cipher mode defined in NIST SP 800-38A in which the block cipher is applied repeatedly to the IV to produce a keystream. Like CTR it needs no padding, but unlike CTR it cannot be parallelised.

OFB encrypts the IV to obtain the first keystream block, then encrypts that block to obtain the next, and so on. The keystream is XORed with the plaintext. Because the keystream is independent of the plaintext, a bit error in the ciphertext affects only the corresponding plaintext bit, which made OFB attractive for noisy channels.

NextSSL includes AES-128-OFB, AES-192-OFB and AES-256-OFB. OFB's keystream does not depend on the plaintext, so it can be precomputed before the data is available. If a keystream block ever repeats, the generator enters a cycle; with AES this is very unlikely for practical message lengths. OFB is rarely chosen for new protocols, which use CTR or an AEAD mode instead.

History

1980–2001
  1. AES-OFB published

  2. Specified in NIST SP 800-38A

Security notes

OFB requires a unique IV per key; reuse exposes the XOR of plaintexts. It provides no integrity and allows targeted bit-flipping. It has no advantages over CTR for new designs.

Typical uses

Legacy protocol interoperabilityError-tolerant channels

Sizes

FieldBytesMeaning
key16Secret key
nonce16Nonce / IV

Use it

from nextssl_demo import NextSSL

ns = NextSSL()              # safe API: safe and standard tiers
ct = ns.call("stream_apply", "aes-128-ofb", None, key, nonce, b"secret")[0]   # same call decrypts

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

Other AES-OFB variants

2

Frequently asked questions

What is AES-128-OFB?

AES-128-OFB is a stream cipher in the AES-OFB family. OFB (Output Feedback) is a block cipher mode defined in NIST SP 800-38A in which the block cipher is applied repeatedly to the IV to produce a keystream. It is also known as aes128-ofb.

What are the AES-128-OFB sizes?

In NextSSL, AES-128-OFB uses: key 16 bytes, nonce 16 bytes.

Who designed AES-128-OFB and when?

AES-128-OFB belongs to the AES-OFB family, first published in 1980. Its origin: NIST SP 800-38A.

Which standards define AES-128-OFB?

AES-128-OFB is referenced by NIST SP 800-38A. It is specified in a FIPS standard.

Is AES-128-OFB safe to use?

AES-128-OFB is in the standard tier. Standardised and sound. Reachable from the safe API. It can be called from the safe API.

What other AES-OFB variants are there?

NextSSL also registers aes-192-ofb, aes-256-ofb in the AES-OFB family.