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
Properties
AlgorithmName
The name of the algorithm this cipher implements.
public virtual string AlgorithmName { get; }
Property Value
Methods
A(byte[])
protected static void A(byte[] z)
Parameters
zbyte[]
FE(byte[], byte[])
protected static void FE(byte[] D, byte[] RK)
Parameters
FO(byte[], byte[])
protected static void FO(byte[] D, byte[] RK)
Parameters
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
forEncryptionboolInitialise for encryption if true, for decryption if false.
parametersICipherParametersThe key or other data required by the cipher.
KeySchedule(bool, byte[])
protected static byte[][] KeySchedule(bool forEncryption, byte[] K)
Parameters
Returns
- byte[][]
KeyScheduleRound(byte[], byte[], int)
protected static byte[] KeyScheduleRound(byte[] w, byte[] wr, int n)
Parameters
Returns
- byte[]
ProcessBlock(byte[], int, byte[], int)
Process a block.
public virtual int ProcessBlock(byte[] input, int inOff, byte[] output, int outOff)
Parameters
inputbyte[]inOffintThe offset into that the input block begins.
outputbyte[]outOffintThe 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
inputReadOnlySpan<byte>The input block as a span.
outputSpan<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
keysbyte[][]
SB1(byte)
protected static byte SB1(byte x)
Parameters
xbyte
Returns
SB2(byte)
protected static byte SB2(byte x)
Parameters
xbyte
Returns
SB3(byte)
protected static byte SB3(byte x)
Parameters
xbyte
Returns
SB4(byte)
protected static byte SB4(byte x)
Parameters
xbyte
Returns
SL1(byte[])
protected static void SL1(byte[] z)
Parameters
zbyte[]
SL2(byte[])
protected static void SL2(byte[] z)
Parameters
zbyte[]
Xor(byte[], byte[])
protected static void Xor(byte[] z, byte[] x)