Skip to main content
IoT
PSUT Engineering StudioPrincess Sumaya University for Technology
Student Edition
Cyber Defense StudioIoT Security and PrivacyExperimentsWorkspaces
IoT Security and Privacy / LC01
IoTPSUT IoT Engineering StudioPrincess Sumaya University for Technology · Dr. Mohammad Alja’afreh
ESSENTIAL LABORATORY · LC01 · IoT SECURITY AND PRIVACY
IoT Security and Privacy

Ascon — lightweight authenticated encryption and hashing

Trace the 320-bit permutation, authenticate an IoT packet and inspect sponge hashing.

Design experiment & verify evidence →
LC01 · Laboratory mentorAsk about the current experiment, its algorithms or Python notebook.
Ask Dr. MohammadAdaptive practice
LC01 · Academic orientation

Scope and objectives

Scope of the experiment

Trace the 320-bit permutation, authenticate an IoT packet and inspect sponge hashing.

The focus of this experiment is to trace lightweight Ascon authenticated encryption and hashing roles. Students then inspect nonce, associated-data and tag verification conditions, and verify supplied vectors and distinguish algorithm families. The Concepts view explains the operation before the practical work; the Simulation view is used to examine reference and changed inputs, not to substitute for actual measurements.

Learning objectives

  • Trace lightweight Ascon authenticated encryption and hashing roles.
  • Inspect nonce, associated-data and tag verification conditions.
  • Verify supplied vectors and distinguish algorithm families.
  • Record the relevant inputs, intermediate states and final verification result before changing the reference configuration.
  • Compare the reference calculation or decision with an independent implementation or authorized observation; state any discrepancy and the applicable model boundary.

Expected learning outcomes

On completion, students can trace lightweight Ascon authenticated encryption and hashing roles, inspect nonce, associated-data and tag verification conditions, and verify supplied vectors and distinguish algorithm families.

Required deliverables

Submit the derivation or state trace for the named operation, the exact reference and changed configurations, the associated simulator or practical evidence, and a short validation statement addressing verify supplied vectors and distinguish algorithm families. Separate predicted values from observations.

Prerequisite knowledge and related learning

Review the foundational terminology in Concepts and confirm readiness using the existing setup instructions. After completion, continue to SIMON — lightweight Feistel block cipher.

Environment and experimental methodology

The included teaching workstation and the listed Python/Colab or WSL implementation. Historical and small-number constructions are instructional, not deployment recommendations.

Begin with a manual prediction, record the baseline, change one independent condition at a time, and compare the resulting trace or measurements with the original prediction. Record observations and uncertainty separately from reference values. Follow the experiment’s specific procedure, safety limits, and acceptance checks.

Ascon · Advanced analytical foundations

Ascon is a permutation-based construction, not a conventional block cipher. A 320-bit state contains five 64-bit words. In the standardized AEAD128 construction, x0 and x1 are the 128-bit rate; x2–x4 form the 192-bit capacity. Hash256 instead absorbs eight bytes per block into x0. The public permutation is shared, but IVs, padding and finalization differ between constructions.

1 · Historical versus standardized variants

ConstructionRateInitialization / processingOutput
Historical Ascon-12864 bitsp12 / p6128-bit tag
Historical Ascon-128a128 bitsp12 / p8128-bit tag
Ascon-AEAD128 (SP 800-232)128 bitsp12 / p8128-bit tag
Ascon-Hash25664 bitsp12 throughout256-bit digest

Historical Ascon-128 encoded its parameters as IV 80400c0600000000. Standardized AEAD128 uses word 00001000808c0001 and little-endian byte encoding. The variants must not be mixed. The standard also defines Ascon-XOF128 and Ascon-CXOF128; these are extendable-output functions, not encryption. This lab calculates AEAD128, Hash256 and the p6/p8/p12 permutation (p6 is included for historical study).

2 · Bit-sliced S-box and diffusion

For a selected bit position j, collect x0[j] through x4[j] into a 5-bit column (x0 as most significant bit for the displayed lookup index). The nonlinear substitution acts on all 64 columns in parallel. After pC, the bit-sliced circuit first performs x0 ^= x4, x4 ^= x3, x2 ^= x1, then computes five cyclic nonlinear terms t[i] = x[i] XOR ((NOT x[(i+1) mod 5]) AND x[(i+2) mod 5]). Postmix t1 ^= t0, t0 ^= t4, t3 ^= t2, t2 = NOT t2. The linear layer applies x_i XOR ROR(x_i,a_i) XOR ROR(x_i,b_i).

State wordRotation aRotation b
x01928
x16139
x216
x31017
x4741

3 · Authenticated encryption mechanics

Initialize IV || K || N; apply p12 and XOR the key into x3,x4. For nonempty associated data, append byte 01 and enough zero bytes to reach a 16-byte boundary (including a complete padding block if already aligned), XOR each block into the rate, and apply p8. Empty AD skips absorption, but not domain separation: flip the most significant bit of x4. For each full plaintext block, XOR into the rate, emit the rate as ciphertext and apply p8. Pad and absorb the final partial block (even when empty), emit only the original tail length. XOR the key into x2,x3, apply p12, XOR it into x3,x4 and serialize the tag. The receiver must authenticate before releasing plaintext. AEAD alone does not prevent replay; the application must enforce freshness and nonce uniqueness.

4 · Sponge construction and resource costs

Hash256 initializes a separate IV and applies p12; pads at the eight-byte rate; XORs each block into x0 and applies p12. It serializes four 64-bit rate chunks, with p12 between chunks. Compare the number of permutation calls, absorbed blocks and output bytes, not just wall-clock timings. ASIC area, cycles, clock frequency and energy are platform-specific; a browser runtime is not an MCU or ASIC benchmark.

NIST SP 800-232 — standardized algorithms

Scientific concepts and engineering principles

Scientific architecture · LC01 · Ascon — lightweight authenticated encryption and hashing

Five 64-bit words, one vertical 5-bit substitution input, and the constant, substitution and diffusion layers.
Five 64-bit words, one vertical 5-bit substitution input, and the constant, substitution and diffusion layers.

Scientific foundations and analytical reasoning

Ascon-AEAD128 uses 320 state bits, 128-bit rate, 192-bit capacity and 12/8-round permutations. Historical Ascon-128 uses different rate and encoding.

Before operating the equipment or executing the program, derive the expected outcome using the required theoretical work in Experiment. Use the diagram to identify the variables and system boundaries.

Scientific theory · Rate, capacity and domain separation

A sponge construction has a rate through which data enters or leaves and a capacity not directly exposed. Ascon uses a 320-bit permutation, with AEAD128 using a 128-bit rate and Hash256 a 64-bit rate. The IV, padding and domain-separation bit distinguish algorithm phases; legacy variants have different encoding and parameters.

Worked example and engineering interpretation

For a 16-byte AEAD message, ciphertext has 16 bytes and the tag adds 16 bytes, with nonce and associated data accounted for separately. An internal padding block is still required at an aligned boundary. Use the advanced permutation and AEAD workstations to verify exact states rather than infer them from output lengths.

Engineering principles · additional worked teaching example

Ascon uses a lightweight permutation-based design. AEAD provides both confidentiality and integrity; nonce and associated data are separate inputs. A tag mismatch requires failure, not returning corrupted plaintext.

From theory to experiment

Predict the reference result before operating the workbench; check the actual intermediate state, units and constraints. The existing simulation, implementation and procedure below are distinct sources of evidence.

How to investigate Ascon — lightweight authenticated encryption and hashing

Trace the 320-bit permutation, authenticate an IoT packet and inspect sponge hashing.

Analytical investigation means collecting an observation, identifying the mechanism, using a calculation or state trace to explain it, and checking your conclusion against evidence. Controlled comparison means changing one independent variable, holding the remaining relevant conditions constant, and measuring a dependent variable against a baseline. Experimental validation means comparing a predicted result to a reproducible observation or assertion; agreement inside a model does not certify hardware. Evidence-based reasoning connects a specific observation to a theoretical rule and states uncertainty, not merely an opinion. Performance characterization records a named metric and its units across conditions; sensitivity analysis changes one parameter across several values. A threat assessment links an asset, threat, consequence and evidence to a mitigation.

Experiment-specific guided practice

Objective: Trace the 320-bit permutation, authenticate an IoT packet and inspect sponge hashing.

  1. Parameters, state and historical IV — complete its numbered steps and record the requested evidence.
  2. AEAD four-phase state trace — complete its numbered steps and record the requested evidence.
  3. Permutation microscope — complete its numbered steps and record the requested evidence.
  4. Hash and constrained-device trade-offs — complete its numbered steps and record the requested evidence.

Reference check: Five 64-bit words; 36 transformations plus input. Tag 4427d64b8e1e1451fc445960f0839bb0. Intact accepted; altered inputs rejected. Empty digest 0b3be5850f2f6b98caf29f8fdea89b64a1fa70aa249b8f839bd53baa304d92b2.

Model boundary: The supplied lecture discusses original Ascon-128 (64-bit rate, p6) and Ascon-128a (128-bit rate, p8). The executable lab follows final NIST SP 800-232 Ascon-AEAD128: 128-bit rate, 192-bit capacity, little-endian encoding, p12/p8 and a 128-bit tag. Ascon-Hash256 uses a 64-bit rate and p12. Earlier vectors and IVs are not interchangeable. The Wi-Fi application in the lecture is an exploration, not a claim that current Wi-Fi uses Ascon.

Independent task and submission evidence

2. AEAD four-phase state trace — complete its numbered steps and record the requested evidence. Record the named input, prediction, actual output and one limitation; restore the original condition and repeat.

Before execution write the independent variable and its levels, dependent observation with units where applicable, baseline, controlled variables, measurement method and expected result. For a state machine use state/event/output rather than inventing a numeric metric. Record failures and repeat the baseline. A weak conclusion is “it works”; a supported conclusion names the changed setting, observed value/state, corresponding rule and one limitation.

TrialChanged settingFixed settingsPredicted resultActual observation / unitsEvidence / uncertainty
A: baselineReferenceRecordPredictRecordRecord
B: one changeRecordSame as APredictRecordRecord
A: repeatRestoreSame as APredictRecordRecord

Completion: submit the filled table, relevant simulator screenshot or terminal/notebook output, reasoning with units/assumptions, and one limitation. Preserve the independent assessment questions; this guide does not fill their answers.

Constrained-device cryptography

Ascon was selected by NIST for lightweight cryptography and provides authenticated encryption and hashing based on a 320-bit permutation. Standardized Ascon-AEAD128 uses a 128-bit key, 128-bit nonce, 128-bit rate, 192-bit capacity, p12 and p8, with a 128-bit authentication tag. Historical Ascon-128 uses a 64-bit rate and p6; Ascon-128a uses a 128-bit rate and p8. Do not mix legacy encoding or IV values with the standardized construction.

Five-word permutation

The state consists of x0…x4, each 64 bits. Each round adds a constant to x2, applies 64 parallel five-bit nonlinear substitutions and diffuses each word using XOR with two rotated copies. The standardized bit/byte ordering is little-endian. The permutation itself is unkeyed; the AEAD construction controls key injection and domain separation.

AEAD and hashing

Load IV, key and nonce, permute and inject key; absorb associated data and separate domains; absorb plaintext while producing ciphertext; finalize with the key and tag. Associated data remains visible but is authenticated. The receiver must verify the tag before releasing plaintext. Ascon-Hash256 absorbs input with a 64-bit rate and squeezes four 64-bit output words. Its unkeyed digest does not identify the sender.

Measurement and trade-offs

Compare throughput, area, energy and latency under the same hardware and software conditions. A small bitwise implementation does not automatically resist power analysis; implementation countermeasures and tests are still required. Use unique nonces for every key and apply replay policy separately from authentication.

Prerequisites: EC08 or EC10

LC01 engineering diagram
Algorithm structure and data flow. Use the simulation to inspect the corresponding numerical transformations.

Historical and standardized AEAD configurations

VariantRate (bits)Capacity (bits)Initial/final roundsIntermediate rounds
Ascon-12864256126
Ascon-128a128192128
Ascon-AEAD128128192128

Permutation round constants

p12 roundp8 roundp6 roundXOR constant for x2
0——0xF0
1——0xE1
2——0xD2
3——0xC3
40—0xB4
51—0xA5
6200x96
7310x87
8420x78
9530x69
10640x5A
11750x4B

Linear diffusion distances

WordFirst rotation rightSecond rotation right
x01928
x16139
x216
x31017
x4741

State encoding, padding and diffusion

For the historical Ascon-128 construction, the IV is 80400c0600000000 in big-endian word notation. In the standardized AEAD construction the little-endian IV word is 00001000808c0001. Initialization loads x0=IV, x1=K0, x2=K1, x3=N0 and x4=N1, then p12 and key injection into x3 and x4. Nonempty associated data is padded and processed in rate-sized blocks; the standardized separator flips bit 63 of x4 even for empty AAD. After full message blocks use p8; pad the final partial or empty block without emitting padding bytes. Finalization XORs the key into x2 and x3, applies p12, then XORs the key into x3 and x4 to form the tag.

Bit-sliced substitution operates vertically across the five words. Word diffusion operates horizontally using x XOR RORa(x) XOR RORb(x). The rotation pairs are (19,28), (61,39), (1,6), (10,17), (7,41). Round constants in p12 are f0 e1 d2 c3 b4 a5 96 87 78 69 5a 4b. The shorter permutations select the final constants.

Hashing and implementation trade-offs

Ascon-Hash256 begins with the standardized IV word 0000080100cc0002 and four zero words, uses a 64-bit absorption rate and p12. Absorb the padded input, then read four 64-bit words with p12 between outputs. A 128-bit PUF response occupies two complete input blocks plus the required padding block. Its unkeyed digest is not authentication. The common permutation is useful for constrained hardware; the bit-sliced implementation avoids table lookups, but does not automatically eliminate timing, power or fault leakage. Hardware serialization and parallel rounds trade area for latency. Benchmark comparable implementations on the same platform.

Engineering diagrams

Ascon round: vertical substitution and horizontal diffusion.
Ascon round: vertical substitution and horizontal diffusion.
Standardized AEAD: initialization, associated data, message and tag.
Standardized AEAD: initialization, associated data, message and tag.
Absorb all padded message blocks, then squeeze four output words.
Absorb all padded message blocks, then squeeze four output words.

Worked engineering reasoning and boundary conditions

Ascon-AEAD128 uses a 320-bit permutation state, with a 128-bit key and nonce and 128-bit tag in the standardized AEAD. Associated data is authenticated, not encrypted; nonce uniqueness is essential.

Use the diagram to follow the calculation or state progression. Keep the teaching configuration separate from the independent exercise values; compare observations with the actual model and implementation.

Concept animation · operation pathway

Explore the teaching example independently of the simulator. Each step reveals an operation, data relationship or calculated state. The Simulation view has separate editable inputs.

Ascon — lightweight authenticated encryption and hashing: operation pathwayInitialize320-bit Ascon stateAbsorbassociated dataEncryptplaintext andpermutationFinalize128-bitauthentication tag;reject invalidRead the active operation, then inspect the accumulated state.

Step 1 of 4 · Initialize

Initialize

Initialize
320-bit Ascon state

Teaching example only; inspect live calculations or real practical evidence separately.

Interactive flashcards

Self-rated study progress is stored locally, not used for official grades.

Browse all explanations
What is Ascon state width?

320 bits, five 64-bit words.

What rate does standardized AEAD128 use?

128 bits.

What are p12 and p8?

Permutations with 12 and 8 rounds.

What happens to altered associated data?

Authentication fails.

What is the standardized AEAD variant called?

Ascon-AEAD128.

What are the historical Ascon-128 rate and intermediate rounds?

64 bits and p6.

What is the standardized AEAD capacity?

192 bits.

Where is the round constant injected?

Into state word x2.

What does pS do?

Applies a parallel nonlinear five-bit substitution.

What does pL do?

Diffuses each word using XOR with rotated versions of itself.

What are the four AEAD phases?

Initialization, associated data, plaintext/ciphertext processing and finalization.

Why keep the nonce unique under a key?

Nonce reuse violates the AEAD security requirements.

What does associated data permit?

Authentication of readable metadata without encrypting it.

What should a changed tag cause?

Rejection before releasing plaintext.

Which state words form the standardized Ascon-AEAD128 rate?

x0 and x1 (128 bits); x2, x3 and x4 form the 192-bit capacity.

What are the p12 round constants in order?

f0, e1, d2, c3, b4, a5, 96, 87, 78, 69, 5a, 4b. p8 and p6 take the final 8 and 6 respectively.

Only bit 0 of x0 is set. Which bits are set after its diffusion function?

Bits 0, 36 and 45, due to XOR with ROR19 and ROR28. This is not a full round.

AAD is empty. Is domain separation skipped?

No. Skip AAD block absorption, but perform the domain separation before processing the message.

Can an authenticated packet be replayed successfully if the tag is valid?

Authentication alone does not prevent replay. Enforce an independent freshness rule.

Why can Ascon-128a process more data per permutation than Ascon-128?

Its rate is 128 rather than 64 bits, although it uses eight rather than six intermediate rounds. A performance claim must still be measured.

Shared research workbenches · network designer & advanced studies
Concurrent-device simulation & Monte Carlo research
Distributed digital twin · topology, protocol & battery research