Table of Contents

Class Camellia192

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

Camellia-192 symmetric cipher implementation.

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

Remarks

Camellia-192 uses a 192-bit (24-byte) key with 24 rounds of encryption. It is specified in RFC 3713 and ISO/IEC 18033-3.

Security level: 192 bits (quantum: 96 bits with Grover's algorithm)

Note: Camellia-192 uses the same 24-round structure as Camellia-256. The 192-bit key is internally expanded to 256 bits by complementing the rightmost 64 bits to form the second 128-bit key half.

Constructors

Camellia192()

Initializes a new instance of the Camellia192 class.

public Camellia192()

Fields

KeySizeBits

Key size in bits for Camellia-192.

public const int KeySizeBits = 192

Field Value

int

KeySizeBytes

Key size in bytes for Camellia-192.

public const int KeySizeBytes = 24

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 Camellia192 cipher.

public static Camellia192 Create()

Returns

Camellia192

A new Camellia-192 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.