Top Description Fields Constructors Methods
org.bouncycastle.crypto.engines

public final Class SerpentEngine

extends SerpentEngineBase
Class Inheritance
Imports
org.bouncycastle.util.Pack

Serpent is a 128-bit 32-round block cipher with variable key lengths, including 128, 192 and 256 bit keys conjectured to be at least as secure as three-key triple-DES.

Serpent was designed by Ross Anderson, Eli Biham and Lars Knudsen as a candidate algorithm for the NIST AES Quest.

For full details see The Serpent home page

Field Summary

Inherited from org.bouncycastle.crypto.engines.SerpentEngineBase:
BLOCK_SIZEencryptingkeyBitsPHIROUNDSwKey

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected void
decryptBlock(byte[]
the array containing the input data.
input
,
int
offset into the in array the data starts at.
inOff
,
byte[]
the array the output data will be copied into.
output
,
int
the offset into the out array the output will start at.
outOff
)

Implements abstract org.bouncycastle.crypto.engines.SerpentEngineBase.decryptBlock.

Decrypt one block of ciphertext.
protected void
encryptBlock(byte[]
the array containing the input data.
input
,
int
offset into the in array the data starts at.
inOff
,
byte[]
the array the output data will be copied into.
output
,
int
the offset into the out array the output will start at.
outOff
)

Implements abstract org.bouncycastle.crypto.engines.SerpentEngineBase.encryptBlock.

Encrypt one block of plaintext.
protected int[]
makeWorkingKey(byte[]
The user-key bytes (multiples of 4) to use.
key
)

Implements abstract org.bouncycastle.crypto.engines.SerpentEngineBase.makeWorkingKey.

Expand a user-supplied key material into a session key.
Inherited from org.bouncycastle.crypto.engines.SerpentEngineBase:
getAlgorithmNamegetBlockSizeib0ib1ib2ib3ib4ib5ib6ib7initinverseLTLTprocessBlockresetrotateLeftrotateRightsb0sb1sb2sb3sb4sb5sb6sb7

Constructor Detail

SerpentEngineback to summary
public SerpentEngine()

Method Detail

decryptBlockback to summary
protected void decryptBlock(byte[] input, int inOff, byte[] output, int outOff)

Implements abstract org.bouncycastle.crypto.engines.SerpentEngineBase.decryptBlock.

Decrypt one block of ciphertext.

Parameters
input:byte[]

the array containing the input data.

inOff:int

offset into the in array the data starts at.

output:byte[]

the array the output data will be copied into.

outOff:int

the offset into the out array the output will start at.

encryptBlockback to summary
protected void encryptBlock(byte[] input, int inOff, byte[] output, int outOff)

Implements abstract org.bouncycastle.crypto.engines.SerpentEngineBase.encryptBlock.

Encrypt one block of plaintext.

Parameters
input:byte[]

the array containing the input data.

inOff:int

offset into the in array the data starts at.

output:byte[]

the array the output data will be copied into.

outOff:int

the offset into the out array the output will start at.

makeWorkingKeyback to summary
protected int[] makeWorkingKey(byte[] key) throws IllegalArgumentException

Implements abstract org.bouncycastle.crypto.engines.SerpentEngineBase.makeWorkingKey.

Expand a user-supplied key material into a session key.

Parameters
key:byte[]

The user-key bytes (multiples of 4) to use.