Engineer working on a laptop connected to a device test rig, surrounded by wiring harnesses and test hardware

Firmware vulnerabilities & fixes

NIST SP 800-232: the Ascon lightweight cryptography standard, explained

Last updated:

NIST SP 800-232, "Ascon-Based Lightweight Cryptography Standards for Constrained Devices: Authenticated Encryption, Hash, and Extendable Output Functions," is a NIST Special Publication finalized in August 2025 that specifies four cryptographic algorithms built on the Ascon family, purpose-built for devices too resource-constrained to run conventional AES-GCM or SHA-3 efficiently. Authored by Meltem Sönmez Turan, Kerry A. McKay, Jinkeon Kang and John Kelsey of NIST's Computer Security Division with Donghoon Chang of Strativia, and approved by NIST's Editorial Review Board on 9 July 2025, it is the outcome of a NIST standardization effort that started in 2015 and selected the Ascon family in February 2023. Like other NIST SP 800-series guidance, it is a U.S. government work not subject to copyright and may be used voluntarily by any organization.

Key takeaways

  • Ascon was designed by Christoph Dobraunig, Maria Eichlseder, Florian Mendel and Martin Schläffer and first submitted to the CAESAR competition in 2014.
  • All four share one building block, the 320-bit, five-word Ascon permutation, used as Ascon-p[8] (8 rounds) or Ascon-p[12] (12 rounds).
  • Key secrecy (R2): the key, and the masked nonce when nonce masking is used, must be kept secret.
  • Nonce masking solves a different problem.

What problem does this solve, given AES and SHA-3 aren't always a good fit?

Per the standard's own Introduction, NIST started its Lightweight Cryptography Standardization Process in 2015 "to develop cryptographic standards that are suitable for constrained environments in which conventional cryptographic standards (e.g., AES-GCM, SHA-2 and SHA-3 hash function families) may be resource-intensive." The Abstract frames Ascon as designed to "offer a viable alternative when the Advanced Encryption Standard (AES) may not perform optimally" for "Internet of Things (IoT) devices, embedded systems, and low-power sensors." NIST's 13 August 2025 announcement says the standard "provides a defense from cyberattacks for even the smallest of networked electronic devices" and names RFID tags, smart home appliances, car-mounted toll registers and medical implants. It quotes NIST computer scientist Kerry McKay, who co-led the project: "We encourage the use of this new lightweight cryptography standard wherever resource constraints have hindered the adoption of cryptography." SP 800-232 does not deprecate AES or SHA-3. Both remain the right default for systems that can afford them; it targets the gap where a device's power, memory or silicon budget makes them infeasible.

How did a 2014 competition entry become a NIST standard?

Ascon was designed by Christoph Dobraunig, Maria Eichlseder, Florian Mendel and Martin Schläffer and first submitted to the CAESAR competition in 2014. Its Ascon-128 and Ascon-128a variants were selected as the first choice for lightweight authenticated encryption in CAESAR's final portfolio, announced in February 2019. NIST's own process announced the selection of the Ascon family in February 2023; NIST IR 8454 gives the reasons, including "performance advantages over current NIST AEAD and hash standards" on constrained platforms and "a lower additional cost for protected implementations." The CSRC record lists the draft on 8 November 2024 and the final on 13 August 2025.

The SP 800-232 PDF lists seven technical differences from the Ascon v1.2 submission:

Change What it means
Permutations Round constants for up to 16 rounds (the submission defined 6, 8 and 12) "to accommodate potential functionality extensions in the future"
AEAD variant Ascon-AEAD128 is based on ASCON-128a, not ASCON-128 or the 80-bit-key ASCON-80pq
Hash variant Ascon-Hash256 is based on ASCON-HASH
XOF variants Ascon-XOF128 is based on ASCON-XOF; Ascon-CXOF128 is new
Initial values New format "that accommodates potential functionality extensions"
Endianness Big-endian to little-endian, "to improve performance on little-endian microcontrollers"
Implementation options Tag truncation and nonce masking added

The endianness and initial-value changes mean outputs differ from Ascon v1.2. Test vectors from before the standard do not match.

What are the four algorithms?

All four share one building block, the 320-bit, five-word Ascon permutation, used as Ascon-p[8] (8 rounds) or Ascon-p[12] (12 rounds). One compact implementation can serve every function below.

Algorithm What it does Key facts
Ascon-AEAD128 Authenticated encryption with associated data (AEAD) 128-bit key, nonce and tag; 128-bit rate / 192-bit capacity; Ascon-p[12] at initialization and finalization, Ascon-p[8] per 128-bit block; 128-bit security strength in the single-key, nonce-respecting setting
Ascon-Hash256 Fixed-length cryptographic hash 256-bit digest; 64-bit rate / 256-bit capacity; Ascon-p[12] only; 128-bit security strength against collision, preimage and second-preimage attacks
Ascon-XOF128 Extendable-output function (XOF) Caller picks the output length L; collision strength min(L/2, 128) bits; a shorter output is a prefix of a longer one for the same input
Ascon-CXOF128 Customized XOF Customization string of at most 2048 bits (256 bytes) for domain separation; the standard suggests encoding the output length in that string when the prefix property is unwanted

Ascon-AEAD128 is "online" and single-pass: the i-th ciphertext block depends only on the key, nonce, associated data and the first i plaintext blocks. All four are "inverse-free", so an implementation only needs the permutation in its forward direction, which saves code size on constrained hardware.

Which key-handling rules can't implementers skip (R1-R7)?

Section 4.3 lists seven requirements for Ascon-AEAD128 that matter as much as the algorithm choice:

  1. Key generation (R1):keys, including any nonce-masking key, generated per SP 800-133 with an approved random bit generator of at least 128-bit security strength, and "not used for other purposes."
  2. Key secrecy (R2):the key, and the masked nonce when nonce masking is used, must be kept secret.
  3. Unique nonces (R3):nonces must be distinct for each encryption under a given key.
  4. Minimum truncated-tag length (R4):at least 32 bits; below 64 bits only "after a careful risk analysis"; the tag length stays fixed for the life of the key.
  5. Decryption-failure limit (R5):for tag length λ from 64 to 128 bits, failures under a key shall not exceed 2^(λ-32); for 32 ≤ λ < 64, failures should be limited to 1 unless a risk analysis justifies relaxing that, up to the same bound.
  6. Data limit (R6):at most 2^54 bytes processed under one key, including the nonce.
  7. Key update (R7):the key shall be updated at the 2^54-byte limit, and should be updated when the decryption-failure limit is reached.

What happens if a nonce repeats, and what does nonce masking fix?

Section 4.4.3 is direct: the confidentiality of plaintext, in Ascon-AEAD128 and with nonce masking, "can be compromised if a nonce or, more specifically, (nonce, associated data) pair, is reused with the same secret key." The algorithms provide "some resilience against unintentional nonce reuse". Integrity guarantees hold if each (nonce, AD) pair is reused at most 2^8 times per key (Table 8). Nonce reuse is therefore a confidentiality failure that a device design must prevent, not an accepted mode of operation.

Nonce masking solves a different problem. With u independent keys, for example one per device in a large fleet, plain Ascon-AEAD128 without truncation gives (128 − log2 u)-bit security (§4.4.2). Nonce masking XORs an extra 128-bit key into the nonce and restores 128-bit security when the tag is not truncated. §4.2.2 adds a limit: use it "only … when context-commitment security and related-key security are not concerns."

How do you implement Ascon on a constrained microcontroller?

  • Load words directly. Appendix A notes that on little-endian machines, data "can be loaded from memory directly into the Ascon state without the need to perform any conversion."
  • Precompute the hash and XOF initial state. Appendix A.3 notes that the initialization of Ascon-Hash256, Ascon-XOF128 and Ascon-CXOF128 does not depend on the input, so the post-initialization state can be stored as constants, saving one Ascon-p[12] call.
  • Stream large inputs. §5.4 defines Init / Absorb / Squeeze functions for the XOFs and notes that similar interfaces can be defined for AEAD and hashing. That suits hashing a firmware image in flash pages.
  • Start from the designers' code. The Ascon C repository (CC0-1.0) has reference and optimized SP 800-232 implementations, including armv6m, armv7m, esp32, avr and bit-interleaved 32-bit variants. Its README reports these code sizes in bytes:
Target Ascon-AEAD128 Ascon-XOF128 AEAD + XOF combined
ARMv6-M (Cortex-M0/M0+) 1,162 664 1,386
ARMv7-M (Cortex-M3/M4/M7) 1,090 632 1,346
RV32I 1,612 1,000 2,380
ESP32 1,098 619 1,436
AVR (8-bit) 3,512 1,662 4,000

IR 8454's benchmarks put Ascon among the five fastest finalists on the ESP32 MCU and among the five smallest there.

Does Ascon protect against side-channel attacks?

Not by itself. NIST's release says that "no cryptographic algorithm is inherently immune to such attacks," but that Ascon "is designed to support side-channel-resistant implementations more easily than many traditional algorithms." IR 8454 §4.3 reports both sides. One cited study recovered the full key of a lightweight Ascon implementation on an Artix-7 FPGA from 24K power traces with a deep-learning attack. Separately, protected software implementations of Ascon "were evaluated and passed all leakage assessment and attack attempts" in the GMU-coordinated study.

The masked protected_bi32_armv6 implementations in the Ascon C repository come with a warning: the compiler "may heavily optimize the code and even combine shares", and "any generated output needs to be security evaluated." If an attacker can hold the device and measure power, as with a meter, lock or implant, budget for a masked implementation and a leakage test on your own silicon and toolchain.

What does a nonce and key plan look like for a real device?

Worked example, synthetic: a fictional battery-powered BLE sensor fleet sending 24-byte readings once a minute to a gateway. It does not describe a real product.

Decision Choice Rule it satisfies
Key Per-device 128-bit key generated at provisioning from an approved RBG, used only for this channel R1, R2
Nonce 32-bit boot counter persisted in flash and incremented before the first send, followed by a 96-bit message counter in RAM R3: survives power loss without per-message flash writes
Tag Truncated to 64 bits to save airtime, recorded in a risk analysis R4
Failure limit Gateway rekeys the device after 2^32 failed decryptions (2^(64-32)) R5, R7
Data limit About 21 MB a year per device including nonces, far below 2^54 bytes R6
Fleet size With a 64-bit tag the multi-key bound min(128 − log2 u, 64) stays at 64 bits for any realistic fleet, so nonce masking adds little here §4.4.2

How is conformance tested, and what isn't approved?

Per Section 6, implementations may be tested under NIST's validation programs (FIPS 140-3 module validation covers the module level), with example test vectors from the Cryptographic Algorithm Validation Program. NIST's ACVP-Server repository carries JSON test files for all four: Ascon-AEAD128, Ascon-Hash256, Ascon-XOF128 and Ascon-CXOF128, each suffixed SP800-232. Two limits: Ascon-Hash256 inside HMAC is not approved, and the same applies to the XOFs, which "are not approved as hash functions."

When should a device keep AES-GCM instead?

If the MCU has AES hardware acceleration and the power budget allows it, AES-GCM remains a sound choice. IR 8454 names "the lack of an option for 256-bit keys" as a limitation, adding that "When post-quantum security and 256-bit keys are required, AES-GCM can be used." For the asymmetric side of a post-quantum plan, see FIPS 203, 204 and 205. Ascon is not a replacement for those.

What is a workable starting point?

  1. Reach for SP 800-232 where AES-GCM or SHA-3 genuinely don't fitOn a general-purpose MCU with a crypto accelerator, there is little to gain from switching.
  2. Treat R1-R7 as part of the specification, not optional hardeningThe security claims in Section 4.4 depend on them.
  3. Design nonce generation firstUse a counter that survives resets and power loss. Nonce masking addresses multi-key security, not nonce reuse.
  4. Don't put Ascon-Hash256, Ascon-XOF128 or Ascon-CXOF128 inside HMACUse Ascon-AEAD128 when you need encryption and authentication, or an approved MAC construction when you only need authentication.
  5. Validate against the ACVP vectorsfor byte-level correctness: endianness, padding and initial values.

Which mistakes break Ascon deployments?

  • Using pre-standard test vectors. Ascon v1.2 KATs are big-endian with the old initial values.
  • Resetting the nonce counter on reboot, factory reset or a firmware update that wipes the counter page.
  • Assuming nonce masking makes nonce reuse safe. It does not protect confidentiality under reuse.
  • Shipping Ascon-Mac or Ascon-Prf as "the NIST standard". The Ascon C repository includes them, but SP 800-232 specifies only the four algorithms above.
  • Calling an unmasked build side-channel resistant. Only an evaluated, protected implementation earns that claim.
  • Reusing the AEAD key for another purpose, which R1 forbids.

For other weak-crypto patterns in firmware, see how to fix weak cryptography in embedded firmware.

Where does SoftWSP fit?

SoftWSP does not review algorithm choices, nonce handling or side-channel resistance. Its firmware pipeline turns an image's software inventory into a CycloneDX 1.6 SBOM (firmware SBOM), where packaged crypto libraries such as mbed TLS, wolfSSL or OpenSSL appear as components. It matches them against NVD, CISA KEV, FIRST EPSS and CISA ICS advisories and drafts a cited report for an engineer to review. Crypto code compiled straight into a bare-metal image without package metadata may not appear in the SBOM at all. See Device & Firmware Security.

This guide summarizes NIST SP 800-232, NIST IR 8454, NIST's announcement of the final standard and the Ascon designers' C implementation notes. It is not a substitute for the full standard or for cryptographic implementation review.

Put this guide to work

Frequently asked questions

What is NIST SP 800-232, and who wrote it?

NIST Special Publication 800-232, "Ascon-Based Lightweight Cryptography Standards for Constrained Devices: Authenticated Encryption, Hash, and Extendable Output Functions," is a final NIST standard authored by Meltem Sönmez Turan, Kerry A. McKay, Jinkeon Kang and John Kelsey of NIST's Computer Security Division, with Donghoon Chang of Strativia, approved by the NIST Editorial Review Board on 9 July 2025 and published in August 2025 (DOI 10.6028/NIST.SP.800-232). Per its own Authority section, like other NIST SP 800-series guidance it "may be used by nongovernmental organizations on a voluntary basis and is not subject to copyright in the United States" (attribution is appreciated, not required). The standard specifies four algorithms built on the Ascon family: Ascon-AEAD128 (authenticated encryption), Ascon-Hash256 (a fixed-length hash function), and two extendable-output functions, Ascon-XOF128 and Ascon-CXOF128.

Why does NIST need a separate "lightweight" cryptography standard when AES-GCM and SHA-3 already exist?

Per the standard's own Introduction, NIST initiated its Lightweight Cryptography Standardization Process in 2015 "to develop cryptographic standards that are suitable for constrained environments in which conventional cryptographic standards (e.g., AES-GCM, SHA-2 and SHA-3 hash function families) may be resource-intensive." The Abstract states the Ascon family was selected to "offer a viable alternative when the Advanced Encryption Standard (AES) may not perform optimally," for environments such as "Internet of Things (IoT) devices, embedded systems, and low-power sensors." In NIST's own August 2025 announcement of the finalized standard, the agency said it provides "a defense from cyberattacks for even the smallest of networked electronic devices," naming RFID tags and medical implants as examples, and quoted NIST computer scientist Kerry McKay, who co-led the project: "We encourage the use of this new lightweight cryptography standard wherever resource constraints have hindered the adoption of cryptography." SP 800-232 does not replace or deprecate AES or SHA-3 for general-purpose use — it targets the specific case where those algorithms' resource footprint is the blocker.

How was the Ascon family selected, and what changed between the original design and this NIST standard?

Per SP 800-232's Introduction, Ascon (designed by Christoph Dobraunig, Maria Eichlseder, Florian Mendel and Martin Schläffer) was first submitted to the CAESAR competition in 2014, and its Ascon-128/Ascon-128a variants were selected as the first choice for the lightweight authenticated-encryption use case in CAESAR's final portfolio, announced February 2019. Separately, NIST ran its own multi-round Lightweight Cryptography Standardization Process starting in 2015, and in February 2023 announced the selection of the Ascon family for that effort; a draft of SP 800-232 was released for public comment in November 2024 before the final publication in August 2025. The standard itself lists seven technical differences from the original Ascon v1.2 submission, including: the standard's Ascon-AEAD128 is based on the submission's ASCON-128a variant specifically (not ASCON-128 or the 80-bit-key ASCON-80pq); round constants were extended to support up to 16 rounds (the submission defined only 6-, 8- and 12-round permutations) "to accommodate potential functionality extensions in the future"; the byte order was switched from big-endian to little-endian "to improve performance on little-endian microcontrollers"; and new truncation and nonce-masking implementation options were added that did not exist in the original submission.

What are the four algorithms, and what security strength does each provide?

Per Section 1: (1) Ascon-AEAD128 is a nonce-based authenticated-encryption-with-associated-data (AEAD) scheme using a 128-bit key and 128-bit nonce, offering 128-bit security strength for confidentiality and integrity in the single-key, nonce-respecting setting (Section 4.4.1), built on a 320-bit internal state with a 128-bit rate and 192-bit capacity. (2) Ascon-Hash256 is a hash function producing a fixed 256-bit digest with 128-bit security strength against collision, preimage and second-preimage attacks (Table 9), built on a 64-bit rate and 256-bit capacity. (3) Ascon-XOF128 is an extendable-output function (XOF) whose output length is chosen by the caller, with security strength up to 128 bits depending on the requested output length (per Table 9, collision resistance is min(output-length/2, 128) bits). (4) Ascon-CXOF128 is a customized XOF that adds a caller-supplied customization string (up to 2048 bits) for domain separation, so that two calls with the same message but different customization strings produce unrelated outputs. All four share the same 320-bit, five-word Ascon permutation family (Ascon-p[8] and Ascon-p[12], referring to 8 and 12 rounds) as their only underlying primitive, which the standard notes lets a single compact implementation support all four functions.

Sources

  1. NIST SP 800-232: Ascon-Based Lightweight Cryptography Standards for Constrained Devices — Authenticated Encryption, Hash, and Extendable Output Functions (Turan, McKay, Chang, Kang, Kelsey; August 2025; full text, Abstract, Introduction, Sections 1-6, Appendices A-B)
  2. NIST: SP 800-232 publication landing page (CSRC) — metadata, document history, related content
  3. NIST CSRC: Lightweight Cryptography project page (standardization process history)
  4. NIST News (13 August 2025): NIST Finalizes "Lightweight Cryptography" Standard to Protect Small Devices (target devices, Kerry McKay quote, side-channel note)
  5. NIST SP 800-232 full text (PDF, nvlpubs.nist.gov): Sections 4.2-4.4 nonce masking and nonce-misuse, 5.4 streaming API, 6 conformance, Appendix A implementation notes
  6. Ascon C reference, optimized and masked implementations (ascon/ascon-c, CC0-1.0): README code-size table and masked-implementation note
  7. NIST ACVP-Server gen-val JSON files (Ascon-AEAD128, Ascon-Hash256, Ascon-XOF128, Ascon-CXOF128 SP800-232 test vectors)
  8. NIST Internal Report (IR) 8454: Status Report on the Final Round of the NIST Lightweight Cryptography Standardization Process (2023) — selection of the Ascon family
Was this guide helpful?

In this cluster