|
Bouncy Castle Cryptography Library 1.77.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.bouncycastle.crypto.engines.Zuc128CoreEngine
Zuc128Engine implementation. Based on https://www.gsma.com/aboutus/wp-content/uploads/2014/12/eea3eia3zucv16.pdf
Constructor Summary | |
protected |
Zuc128CoreEngine()
Constructor. |
protected |
Zuc128CoreEngine(Zuc128CoreEngine pSource)
Constructor. |
Method Summary | |
Memoable |
copy()
Create a copy of the engine. |
static void |
encode32be(int val,
byte[] buf,
int off)
Encode a 32-bit value into a buffer (little-endian). |
java.lang.String |
getAlgorithmName()
Obtain Algorithm Name. |
protected int |
getMaxIterations()
Obtain Max iterations. |
void |
init(boolean forEncryption,
CipherParameters params)
initialise a Snow3G cipher. |
protected int |
makeKeyStreamWord()
Create the next keyStream word. |
int |
processBytes(byte[] in,
int inOff,
int len,
byte[] out,
int outOff)
Process bytes. |
void |
reset()
Reset the engine. |
void |
reset(Memoable pState)
Reset from saved engine state. |
byte |
returnByte(byte in)
Process single byte. |
protected void |
setKeyAndIV(int[] pLFSR,
byte[] k,
byte[] iv)
Process key and IV into LFSR. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected Zuc128CoreEngine()
protected Zuc128CoreEngine(Zuc128CoreEngine pSource)
pSource
- the source engineMethod Detail |
public void init(boolean forEncryption, CipherParameters params)
init
in interface StreamCipher
forEncryption
- whether or not we are for encryption.params
- the parameters required to set up the cipher.java.lang.IllegalArgumentException
- if the params argument is inappropriate.protected int getMaxIterations()
public java.lang.String getAlgorithmName()
getAlgorithmName
in interface StreamCipher
public int processBytes(byte[] in, int inOff, int len, byte[] out, int outOff)
processBytes
in interface StreamCipher
in
- the input bufferinOff
- the starting offset in the input bufferlen
- the length of data in the input bufferout
- the output bufferoutOff
- the starting offset in the output bufferpublic void reset()
reset
in interface StreamCipher
public byte returnByte(byte in)
returnByte
in interface StreamCipher
in
- the input bytepublic static void encode32be(int val, byte[] buf, int off)
val
- the value to encodebuf
- the output bufferoff
- the output offsetprotected void setKeyAndIV(int[] pLFSR, byte[] k, byte[] iv)
pLFSR
- the LFSRk
- the keyiv
- the ivprotected int makeKeyStreamWord()
public Memoable copy()
copy
in interface Memoable
public void reset(Memoable pState)
reset
in interface Memoable
pState
- the state to restore
|
Bouncy Castle Cryptography Library 1.77.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |