Table of Contents

Class Aria128

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

ARIA-128 symmetric cipher implementation.

public sealed class Aria128 : SymmetricCipher, IDisposable
Inheritance
Aria128
Implements
Inherited Members

Remarks

ARIA-128 is the Korean national standard block cipher (KS X 1213) using a 128-bit key with 12 rounds of encryption.

Constructors

Aria128()

Initializes a new instance of the Aria128 class.

public Aria128()

Fields

KeySizeBits

Key size in bits for ARIA-128.

public const int KeySizeBits = 128

Field Value

int

KeySizeBytes

Key size in bytes for ARIA-128.

public const int KeySizeBytes = 16

Field Value

int

Properties

AlgorithmName

Gets the name of the cipher algorithm.

public override string AlgorithmName { get; }

Property Value

string

Examples

"AES-256", "ChaCha20", "AES-256-GCM"

IVSize

Gets the required IV/nonce size in bytes for the current mode.

public override int IVSize { get; }

Property Value

int

Methods

Create()

Creates a new instance of the Aria128 cipher.

public static Aria128 Create()

Returns

Aria128

A new ARIA-128 cipher instance.

CreateCipherDecryptor(ReadOnlySpan<byte>, ReadOnlySpan<byte>)

Creates a decryptor transform using the specified key and IV.

protected override ICipherTransform CreateCipherDecryptor(ReadOnlySpan<byte> key, ReadOnlySpan<byte> iv)

Parameters

key ReadOnlySpan<byte>

The secret key.

iv ReadOnlySpan<byte>

The initialization vector or nonce.

Returns

ICipherTransform

A new cipher decryptor transform.

CreateCipherEncryptor(ReadOnlySpan<byte>, ReadOnlySpan<byte>)

Creates an encryptor transform using the specified key and IV.

protected override ICipherTransform CreateCipherEncryptor(ReadOnlySpan<byte> key, ReadOnlySpan<byte> iv)

Parameters

key ReadOnlySpan<byte>

The secret key.

iv ReadOnlySpan<byte>

The initialization vector or nonce.

Returns

ICipherTransform

A new cipher encryptor transform.