Block cipher modes

AES-256-CFB8

Cipher Feedback mode: turns AES into a self-synchronising stream cipher

standard Safe API Specified in a FIPS standard

About AES-256-CFB8

AES-256-CFB8 is one of 6 AES-CFB variants in the NextSSL registry, a block cipher mode of operation. It uses a 32-byte (256-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 aes256-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–2001
  1. ECB, CBC, CFB and OFB defined for DES in FIPS 81

  2. 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

OpenPGP encryptionLegacy serial or byte-stream protocols

Sizes

FieldBytesMeaning
key32Secret key
nonce16Nonce / IV
block16Block

Use it

from nextssl_demo import NextSSL

ns = NextSSL()              # safe API: safe and standard tiers
ct = ns.call("blockmode_encrypt", "aes-256-cfb8", None, key, iv, data)[0]
pt = ns.call("blockmode_decrypt", "aes-256-cfb8", None, key, iv, ct)[0]

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

Frequently asked questions

What is AES-256-CFB8?

AES-256-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 aes256-cfb8.

What are the AES-256-CFB8 sizes?

In NextSSL, AES-256-CFB8 uses: key 32 bytes, nonce 16 bytes, block 16 bytes.

Who designed AES-256-CFB8 and when?

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

Which standards define AES-256-CFB8?

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

Is AES-256-CFB8 safe to use?

AES-256-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-128-cfb8, aes-192-cfb, aes-192-cfb8, aes-256-cfb in the AES-CFB family.