| Modifier and Type | Field and Description |
|---|---|
| private final int[] | |
| private static final short[] | |
| private final int[] | |
| private final byte[] | keyStream
Advanced stream. |
| private final int[] | LFSR
State. |
| private static final byte[] | |
| private static final byte[] | |
| private int | theIndex
index of next byte in keyStream. |
| private int | theIterations
The iterations. |
| private Zuc128CoreEngine | theResetState
Reset state. |
| Access | Constructor and Description |
|---|---|
| protected | |
| protected |
| Modifier and Type | Method and Description |
|---|---|
| private int | Returns: the resultvalue A a, final int value B b)Modular add c = a + b mod (2^31 � 1). |
| private void | |
| public Memoable | |
| public static void | encode32be(int
the value to encode val, byte[] the output buffer buf, int the output offset off)Encode a 32-bit value into a buffer (little-endian). |
| pack-priv int | |
| public String | Returns: the nameImplements org. Obtain Algorithm Name. |
| protected int | |
| public void | init(final boolean
whether or not we are for encryption. forEncryption, final CipherParameters the parameters required to set up the cipher. params)Implements org. initialise a Snow3G cipher. |
| private static int | |
| private static int | |
| private void | |
| private void | |
| private void | |
| protected int | |
| private static int | Returns: the built integerpart A a, final short part B b, final byte part C c)Build a 31-bit integer from constituent parts. |
| private static int | Returns: the built integerpart A a, final byte part B b, final byte part C c, final byte part D d)Build a 32-bit integer from constituent parts. |
| private static int | Returns: the resultinput value x, final int the power of two k)Multiply by power of two. |
| public int | Returns: the number of bytes returned in the output bufferthe input buffer in, final int the starting offset in the input buffer inOff, final int the length of data in the input buffer len, final byte[] the output buffer out, final int the starting offset in the output buffer outOff)Implements org. Process bytes. |
| public void | |
| public void | reset(final Memoable
the state to restore pState)Implements org. Reset from saved engine state. |
| public byte | Returns: the output bytethe input byte in)Implements org. Process single byte. |
| pack-priv static int | |
| protected void | setKeyAndIV(final int[]
the LFSR pLFSR, final byte[] the key k, final byte[] the iv iv)Process key and IV into LFSR. |
| private void |
| BRC | back to summary |
|---|---|
| private final int[] BRC | |
| EK_d | back to summary |
|---|---|
| private static final short[] EK_d | |
| F | back to summary |
|---|---|
| private final int[] F | |
| keyStream | back to summary |
|---|---|
| private final byte[] keyStream Advanced stream. | |
| LFSR | back to summary |
|---|---|
| private final int[] LFSR State. | |
| S0 | back to summary |
|---|---|
| private static final byte[] S0 | |
| S1 | back to summary |
|---|---|
| private static final byte[] S1 | |
| theIndex | back to summary |
|---|---|
| private int theIndex index of next byte in keyStream. | |
| theIterations | back to summary |
|---|---|
| private int theIterations The iterations. | |
| theResetState | back to summary |
|---|---|
| private Zuc128CoreEngine theResetState Reset state. | |
| Zuc128CoreEngine | back to summary |
|---|---|
| protected Zuc128CoreEngine() Constructor. | |
| Zuc128CoreEngine | back to summary |
|---|---|
| protected Zuc128CoreEngine(final Zuc128CoreEngine pSource) Constructor.
| |
| AddM | back to summary |
|---|---|
| private int AddM(final int a, final int b) Modular add c = a + b mod (2^31 � 1).
| |
| BitReorganization | back to summary |
|---|---|
| private void BitReorganization() BitReorganization. | |
| copy | back to summary |
|---|---|
| public Memoable copy() Implements org. Create a copy of the engine.
| |
| encode32be | back to summary |
|---|---|
| public static void encode32be(int val, byte[] buf, int off) Encode a 32-bit value into a buffer (little-endian).
| |
| F | back to summary |
|---|---|
| pack-priv int F() F. | |
| getAlgorithmName | back to summary |
|---|---|
| public String getAlgorithmName() Implements org. Obtain Algorithm Name.
| |
| getMaxIterations | back to summary |
|---|---|
| protected int getMaxIterations() Obtain Max iterations.
| |
| init | back to summary |
|---|---|
| public void init(final boolean forEncryption, final CipherParameters params) Implements org. initialise a Snow3G cipher.
| |
| L1 | back to summary |
|---|---|
| private static int L1(final int X) L1.
| |
| L2 | back to summary |
|---|---|
| private static int L2(final int X) L2.
| |
| LFSRWithInitialisationMode | back to summary |
|---|---|
| private void LFSRWithInitialisationMode(final int u) LFSR with initialisation mode. | |
| LFSRWithWorkMode | back to summary |
|---|---|
| private void LFSRWithWorkMode() LFSR with work mode. | |
| makeKeyStream | back to summary |
|---|---|
| private void makeKeyStream() Create the next byte keyStream. | |
| makeKeyStreamWord | back to summary |
|---|---|
| protected int makeKeyStreamWord() Create the next keyStream word.
| |
| MAKEU31 | back to summary |
|---|---|
| private static int MAKEU31(final byte a, final short b, final byte c) Build a 31-bit integer from constituent parts.
| |
| MAKEU32 | back to summary |
|---|---|
| private static int MAKEU32(final byte a, final byte b, final byte c, final byte d) Build a 32-bit integer from constituent parts.
| |
| MulByPow2 | back to summary |
|---|---|
| private static int MulByPow2(final int x, final int k) Multiply by power of two.
| |
| processBytes | back to summary |
|---|---|
| public int processBytes(final byte[] in, final int inOff, final int len, final byte[] out, final int outOff) Implements org. Process bytes.
| |
| reset | back to summary |
|---|---|
| public void reset() Implements org. Reset the engine. | |
| reset | back to summary |
|---|---|
| public void reset(final Memoable pState) Implements org. Reset from saved engine state.
| |
| returnByte | back to summary |
|---|---|
| public byte returnByte(final byte in) Implements org. Process single byte.
| |
| ROT | back to summary |
|---|---|
| pack-priv static int ROT(int a, int k) Rotate integer.
| |
| setKeyAndIV | back to summary |
|---|---|
| protected void setKeyAndIV(final int[] pLFSR, final byte[] k, final byte[] iv) Process key and IV into LFSR.
| |
| setKeyAndIV | back to summary |
|---|---|
| private void setKeyAndIV(final byte[] k, final byte[] iv) Process key and IV.
| |