Table of Contents

Class AriaEngine

Namespace
Org.BouncyCastle.Crypto.Engines
Assembly
BouncyCastle.Cryptography.dll
public class AriaEngine : IBlockCipher
Inheritance
AriaEngine
Implements
Inherited Members

Fields

BlockSize

protected const int BlockSize = 16

Field Value

int

Properties

AlgorithmName

The name of the algorithm this cipher implements.

public virtual string AlgorithmName { get; }

Property Value

string

Methods

A(byte[])

protected static void A(byte[] z)

Parameters

z byte[]

FE(byte[], byte[])

protected static void FE(byte[] D, byte[] RK)

Parameters

D byte[]
RK byte[]

FO(byte[], byte[])

protected static void FO(byte[] D, byte[] RK)

Parameters

D byte[]
RK byte[]

GetBlockSize()

public virtual int GetBlockSize()

Returns

int

The block size for this cipher, in bytes.

Init(bool, ICipherParameters)

Initialise the cipher.

public virtual void Init(bool forEncryption, ICipherParameters parameters)

Parameters

forEncryption bool

Initialise for encryption if true, for decryption if false.

parameters ICipherParameters

The key or other data required by the cipher.

KeySchedule(bool, byte[])

protected static byte[][] KeySchedule(bool forEncryption, byte[] K)

Parameters

forEncryption bool
K byte[]

Returns

byte[][]

KeyScheduleRound(byte[], byte[], int)

protected static byte[] KeyScheduleRound(byte[] w, byte[] wr, int n)

Parameters

w byte[]
wr byte[]
n int

Returns

byte[]

ProcessBlock(byte[], int, byte[], int)

Process a block.

public virtual int ProcessBlock(byte[] input, int inOff, byte[] output, int outOff)

Parameters

input byte[]
inOff int

The offset into that the input block begins.

output byte[]
outOff int

The offset into to write the output block.

Returns

int

The number of bytes processed and produced.

Exceptions

DataLengthException

If input block is wrong size, or outBuf too small.

ProcessBlock(ReadOnlySpan<byte>, Span<byte>)

Process a block.

public virtual int ProcessBlock(ReadOnlySpan<byte> input, Span<byte> output)

Parameters

input ReadOnlySpan<byte>

The input block as a span.

output Span<byte>

The output span.

Returns

int

The number of bytes processed and produced.

Exceptions

DataLengthException

If input block is wrong size, or output span too small.

ReverseKeys(byte[][])

protected static void ReverseKeys(byte[][] keys)

Parameters

keys byte[][]

SB1(byte)

protected static byte SB1(byte x)

Parameters

x byte

Returns

byte

SB2(byte)

protected static byte SB2(byte x)

Parameters

x byte

Returns

byte

SB3(byte)

protected static byte SB3(byte x)

Parameters

x byte

Returns

byte

SB4(byte)

protected static byte SB4(byte x)

Parameters

x byte

Returns

byte

SL1(byte[])

protected static void SL1(byte[] z)

Parameters

z byte[]

SL2(byte[])

protected static void SL2(byte[] z)

Parameters

z byte[]

Xor(byte[], byte[])

protected static void Xor(byte[] z, byte[] x)

Parameters

z byte[]
x byte[]