org.bouncycastle.crypto.engines

Class RC532Engine

Implemented Interfaces:
BlockCipher

public class RC532Engine
extends java.lang.Object
implements BlockCipher

The specification for RC5 came from the RC5 Encryption Algorithm publication in RSA CryptoBytes, Spring of 1995. http://www.rsasecurity.com/rsalabs/cryptobytes.

This implementation has a word size of 32 bits.

Implementation courtesy of Tito Pena.

Constructor Summary

RC532Engine()
Create an instance of the RC5 encryption algorithm and set some defaults

Method Summary

String
getAlgorithmName()
int
getBlockSize()
void
init(boolean forEncryption, CipherParameters params)
initialise a RC5-32 cipher.
int
processBlock(byte[] in, int inOff, byte[] out, int outOff)
void
reset()

Constructor Details

RC532Engine

public RC532Engine()
Create an instance of the RC5 encryption algorithm and set some defaults

Method Details

getAlgorithmName

public String getAlgorithmName()
Specified by:
getAlgorithmName in interface BlockCipher

getBlockSize

public int getBlockSize()
Specified by:
getBlockSize in interface BlockCipher

init

public void init(boolean forEncryption,
                 CipherParameters params)
initialise a RC5-32 cipher.
Specified by:
init in interface BlockCipher
Parameters:
forEncryption - whether or not we are for encryption.
params - the parameters required to set up the cipher.

processBlock

public int processBlock(byte[] in,
                        int inOff,
                        byte[] out,
                        int outOff)
Specified by:
processBlock in interface BlockCipher

reset

public void reset()
Specified by:
reset in interface BlockCipher