Table of Contents

AsconHash256 Class

Definition

Namespace
Bodu.Security.Cryptography
Assembly
Bodu.Security.Cryptography.dll
Package
Bodu.Security.Cryptography 1.2.0
Source
AsconHash256.cs

Computes a hash using the ASCON-HASH256 cryptographic hash algorithm as defined in NIST SP 800-232. Produces a 256-bit (32-byte) digest using the Ascon-p12 permutation over a 320-bit sponge state. This class cannot be inherited.

public sealed class AsconHash256 : AsconHash, ICryptoTransform, IDisposable
Inheritance
AsconHash256
Implements
Inherited Members
Extension Methods

Examples

using var hash = new AsconHash256();
byte[] digest = hash.ComputeHash(message);

Remarks

ASCON-HASH256 uses the full 12-round Ascon-p permutation (Ascon-p12) at every phase: initialization, per-block absorption, and output squeezing. This makes it the most conservative ASCON hash variant with respect to security margin.

For applications where throughput is a higher priority than maximum security margin, consider AsconHashA256, which uses an 8-round permutation during absorption (Ascon-p8) and is otherwise identical.

Parameters at a glance.

  • Output size: 256 bits (32 bytes), fixed.
  • State: 320 bits sponge; rate: 64 bits (8 bytes).
  • Permutation: Ascon-p12 at every phase (initialization, absorption, squeezing).
  • Specification: NIST SP 800-232 (ASCON family).

When to choose ASCON-HASH256. Pick this when NIST's lightweight-cryptography selection is the procurement requirement, or for resource-constrained targets (microcontrollers, IoT) where ASCON's small state and software-friendly permutation are an advantage over SHA-2 / SHA-3. For maximum throughput on commodity 64-bit hardware Blake2b or Blake3 typically win; for the higher-throughput ASCON variant accept the smaller absorption-round margin and use AsconHashA256.

Constructors

AsconHash256()

Initializes a new instance of the AsconHash256 class.

public AsconHash256()

Applies to

ProductVersions
.NET8, 10

See Also