Table of Contents

Class SerpentEngineBase

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

Fields

BlockSize

protected static readonly int BlockSize

Field Value

int

X0

protected int X0

Field Value

int

X1

protected int X1

Field Value

int

X2

protected int X2

Field Value

int

X3

protected int X3

Field Value

int

encrypting

protected bool encrypting

Field Value

bool

wKey

protected int[] wKey

Field Value

int[]

Properties

AlgorithmName

The name of the algorithm this cipher implements.

public virtual string AlgorithmName { get; }

Property Value

string

Methods

GetBlockSize()

public virtual int GetBlockSize()

Returns

int

The block size for this cipher, in bytes.

Ib0(int, int, int, int)

protected void Ib0(int a, int b, int c, int d)

Parameters

a int
b int
c int
d int

Ib1(int, int, int, int)

protected void Ib1(int a, int b, int c, int d)

Parameters

a int
b int
c int
d int

Ib2(int, int, int, int)

protected void Ib2(int a, int b, int c, int d)

Parameters

a int
b int
c int
d int

Ib3(int, int, int, int)

protected void Ib3(int a, int b, int c, int d)

Parameters

a int
b int
c int
d int

Ib4(int, int, int, int)

protected void Ib4(int a, int b, int c, int d)

Parameters

a int
b int
c int
d int

Ib5(int, int, int, int)

protected void Ib5(int a, int b, int c, int d)

Parameters

a int
b int
c int
d int

Ib6(int, int, int, int)

protected void Ib6(int a, int b, int c, int d)

Parameters

a int
b int
c int
d int

Ib7(int, int, int, int)

protected void Ib7(int a, int b, int c, int d)

Parameters

a int
b int
c int
d int

Init(bool, ICipherParameters)

public virtual void Init(bool encrypting, ICipherParameters parameters)

Parameters

encrypting bool
parameters ICipherParameters

InverseLT()

protected void InverseLT()

LT()

protected void LT()

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

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

Parameters

input byte[]
inOff int
output byte[]
outOff int

Returns

int

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

Process a block.

public 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.

Sb0(int, int, int, int)

protected void Sb0(int a, int b, int c, int d)

Parameters

a int
b int
c int
d int

Sb1(int, int, int, int)

protected void Sb1(int a, int b, int c, int d)

Parameters

a int
b int
c int
d int

Sb2(int, int, int, int)

protected void Sb2(int a, int b, int c, int d)

Parameters

a int
b int
c int
d int

Sb3(int, int, int, int)

protected void Sb3(int a, int b, int c, int d)

Parameters

a int
b int
c int
d int

Sb4(int, int, int, int)

protected void Sb4(int a, int b, int c, int d)

Parameters

a int
b int
c int
d int

Sb5(int, int, int, int)

protected void Sb5(int a, int b, int c, int d)

Parameters

a int
b int
c int
d int

Sb6(int, int, int, int)

protected void Sb6(int a, int b, int c, int d)

Parameters

a int
b int
c int
d int

Sb7(int, int, int, int)

protected void Sb7(int a, int b, int c, int d)

Parameters

a int
b int
c int
d int