AES-128-CFB8
Cipher Feedback mode: turns AES into a self-synchronising stream cipher
About AES-128-CFB8
AES-128-CFB8 is one of 6 AES-CFB variants in the NextSSL registry, a block cipher mode of operation. It uses a 16-byte (128-bit) key, a 16-byte nonce and a 16-byte (128-bit) block. Its registry entry cites NIST SP 800-38A. It is also known as aes128-cfb8. NextSSL lists it in the standard tier and exposes it through the safe API.
Overview
CFB (Cipher Feedback) is a block cipher mode defined in NIST SP 800-38A that turns a block cipher into a self-synchronising stream cipher. It encrypts data in segments smaller than or equal to the block size without padding.
In CFB the previous ciphertext segment, held in a shift register initialised with the IV, is encrypted with AES and the leftmost s bits of the output are XORed with the next s bits of plaintext to produce ciphertext. That ciphertext is shifted into the register. In CFB-128 the full block is used; in CFB-8 only one byte is processed per AES call, which is slower but resynchronises after a lost byte.
NextSSL includes AES-128, AES-192 and AES-256 in both CFB-128 and CFB-8 variants. CFB is used in OpenPGP's message encryption and some legacy protocols. CFB decryption can be parallelised, but encryption cannot, because each segment depends on the previous ciphertext. The mode needs only the AES encryption direction. Segment size must match on both ends.
History
1980–2001ECB, CBC, CFB and OFB defined for DES in FIPS 81
Carried over to AES in NIST SP 800-38A
Security notes
CFB provides no integrity, so ciphertext can be modified to cause predictable changes in plaintext. It requires a unique, unpredictable IV. CFB-8 with an all-zero IV was the root of the Zerologon vulnerability in Netlogon. Prefer an AEAD mode for new designs.
Typical uses
Sizes
| Field | Bytes | Meaning |
|---|---|---|
| key | 16 | Secret key |
| nonce | 16 | Nonce / IV |
| block | 16 | Block |
Use it
from nextssl_demo import NextSSL
ns = NextSSL() # safe API: safe and standard tiers
ct = ns.call("blockmode_encrypt", "aes-128-cfb8", None, key, iv, data)[0]
pt = ns.call("blockmode_decrypt", "aes-128-cfb8", None, key, iv, ct)[0]
nextssl_blockmode_encrypt("aes-128-cfb8", NULL, key, iv, data, out);
use nextssl_core::Params;
use nextssl_registry::{self as reg, Policy};
let alg = reg::new_blockmode_in(reg::all(), Policy::Safe, "aes-128-cfb8", &Params::new())?;
let ct = alg.encrypt(&key, &iv, &data)?;
Calls follow the NextSSL C ABI and its language bindings. Buffer sizes are validated against the sizes above.
Other AES-CFB variants
5Similar names
Looking for something else?More block cipher modes
All 20Frequently asked questions
What is AES-128-CFB8?
AES-128-CFB8 is a block mode in the AES-CFB family. CFB (Cipher Feedback) is a block cipher mode defined in NIST SP 800-38A that turns a block cipher into a self-synchronising stream cipher. It is also known as aes128-cfb8.
What are the AES-128-CFB8 sizes?
In NextSSL, AES-128-CFB8 uses: key 16 bytes, nonce 16 bytes, block 16 bytes.
Who designed AES-128-CFB8 and when?
AES-128-CFB8 belongs to the AES-CFB family, first published in 1980. Its origin: NIST SP 800-38A.
Which standards define AES-128-CFB8?
AES-128-CFB8 is referenced by NIST SP 800-38A. It is specified in a FIPS standard.
Is AES-128-CFB8 safe to use?
AES-128-CFB8 is in the standard tier. Standardised and sound. Reachable from the safe API. It can be called from the safe API.
What other AES-CFB variants are there?
NextSSL also registers aes-128-cfb, aes-192-cfb, aes-192-cfb8, aes-256-cfb, aes-256-cfb8 in the AES-CFB family.
Related families
Counter-mode AES with a GHASH polynomial MAC; the default AEAD of TLS and IPsec
AESThe Advanced Encryption Standard: the world's default 128-bit block cipher
AES-CTRCounter mode: turns AES into a fast, parallel stream cipher
AES-OFBOutput Feedback mode: a synchronous stream cipher from repeatedly encrypting the IV