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

public final Class TnepresEngine

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

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

Tnepres is based on Serpent which was designed by Ross Anderson, Eli Biham and Lars Knudsen as a candidate algorithm for the NIST AES Quest. Unfortunately there was an endianness issue with test vectors in the AES submission and the resulting confusion lead to the Tnepres cipher as well, which is a byte swapped version of Serpent.

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.
public String
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:
getBlockSizeib0ib1ib2ib3ib4ib5ib6ib7initinverseLTLTprocessBlockresetrotateLeftrotateRightsb0sb1sb2sb3sb4sb5sb6sb7

Constructor Detail

TnepresEngineback to summary
public TnepresEngine()

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.

getAlgorithmNameback to summary
public String getAlgorithmName()

Overrides org.bouncycastle.crypto.engines.SerpentEngineBase.getAlgorithmName.

Implements org.bouncycastle.crypto.BlockCipher.getAlgorithmName.

Doc from org.bouncycastle.crypto.BlockCipher.getAlgorithmName.

Return the name of the algorithm the cipher implements.

Returns:String

the name of the algorithm the cipher implements.

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.