AES-OFB
Output Feedback mode: a synchronous stream cipher from repeatedly encrypting the IV
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–2001AES-OFB published
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
Variants in NextSSL
3| Algorithm | Tier | Sizes (bytes) | Standards | API |
|---|---|---|---|---|
| AES-128-OFB aes-128-ofb |
standard FIPS | key 16 · nonce 16 | NIST SP 800-38A | safe |
| AES-192-OFB aes-192-ofb |
standard FIPS | key 24 · nonce 16 | NIST SP 800-38A | safe |
| AES-256-OFB aes-256-ofb |
standard FIPS | key 32 · nonce 16 | NIST SP 800-38A | safe |
Frequently asked questions
Which AES-OFB variants does NextSSL include?
NextSSL registers 3 AES-OFB variants: aes-128-ofb, aes-192-ofb, aes-256-ofb.