Table of Contents

Class KeccakCore

Namespace
CryptoHives.Foundation.Security.Cryptography.Hash
Assembly
CryptoHives.Foundation.Security.Cryptography.dll

All algorithms based on the Keccak permutation should derive from this class. Provides the derived implementations with the core Keccak-f[1600] permutation, state variables and a buffer for the rate bytes.

public abstract class KeccakCore : HashAlgorithm, ICryptoTransform, IDisposable, IResettable
Inheritance
KeccakCore
Implements
Derived
Inherited Members

Remarks

This class holds the Keccak state used by SHA-3, SHAKE, cSHAKE, KMAC, and related algorithms. It is designed as a shared primitive to reduce code duplication across Keccak-based implementations.

The Keccak state is a 5×5×64 = 1600-bit array organized as 25 64-bit lanes.

Methods

Dispose(bool)

Releases the unmanaged resources used by the HashAlgorithm and optionally releases the managed resources.

protected override void Dispose(bool disposing)

Parameters

disposing bool

true to release both managed and unmanaged resources; false to release only unmanaged resources.

HashCore(ReadOnlySpan<byte>)

When overridden in a derived class, routes data written to the object into the hash algorithm for computing the hash.

protected override void HashCore(ReadOnlySpan<byte> source)

Parameters

source ReadOnlySpan<byte>

The input to compute the hash code for.

Exceptions

ObjectDisposedException

Thrown when the instance has been disposed.

Initialize()

Initializes an implementation of the HashAlgorithm class.

public override void Initialize()

Exceptions

ObjectDisposedException

Thrown when the instance has been disposed.