Table of Contents

AsconHashA256 Class

Definition

Namespace
Bodu.Security.Cryptography
Assembly
Bodu.Security.Cryptography.dll
Package
Bodu.Security.Cryptography 1.3.0
Source
AsconHashA256.cs

Computes a hash using the ASCON-HASHA256 cryptographic hash algorithm, the round-reduced Hasha variant of the Ascon v1.2 submission. Produces a 256-bit (32-byte) digest using a reduced-round Ascon-p permutation over a 320-bit sponge state. This class cannot be inherited.

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

Examples

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

Remarks

ASCON-HASHA256 uses an 8-round Ascon-p permutation (Ascon-p8) during message block absorption and the full 12-round permutation (Ascon-p12) during the initial squeeze phase. Subsequent squeeze blocks also use Ascon-p8. The reduced absorption round count improves throughput for long messages relative to AsconHash256 at a reduced - though still substantial - security margin.

For the highest security margin, use AsconHash256, which applies Ascon-p12 at every phase.

Standard status. NIST SP 800-232 standardizes ASCON-HASH256, not this variant: ASCON-HASHA256 comes from the Ascon v1.2 lightweight-cryptography submission, which SP 800-232 did not adopt. Its initial state and digests match the ascon-c reference implementation. Where a standardized algorithm is required, use AsconHash256.

Parameters at a glance.

  • Output size: 256 bits (32 bytes), fixed.
  • State: 320 bits sponge; rate: 64 bits (8 bytes).
  • Permutation: Ascon-p12 for initialization and the first squeeze; Ascon-p8 for absorption and subsequent squeezes.
  • Specification: the Ascon v1.2 submission (Hasha); not part of NIST SP 800-232.

When to choose ASCON-HASHA256. Pick this when interop with the Ascon v1.2 Hasha variant is required and message throughput matters more than the extra round-count margin of AsconHash256 - typical for IoT gateways and lightweight protocols that hash sustained streams of telemetry. For maximum margin use AsconHash256; for non-ASCON throughput-sensitive hashing on commodity hardware Blake3 is faster still.

Constructors

AsconHashA256()

Initializes a new instance of the AsconHashA256 class.

public AsconHashA256()

Applies to

ProductVersions
.NET8, 10

See Also