https://www.ecrypt.eu.org/stream/p3ciphers/hc/hc128_p3.pdf
It is a third phase candidate in the eStream contest, and is patent-free. No attacks are known as of today (April 2007). See https://www.ecrypt.eu.org/stream/hcp3.html
| Modifier and Type | Field and Description |
|---|---|
| private byte[] | |
| private int | |
| private int | |
| private boolean | |
| private byte[] | |
| private byte[] | |
| private int[] | |
| private int[] |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private static int | |
| private static int | |
| private static int | |
| private int | |
| private int | |
| public String | getAlgorithmName()
Implements org. Return the name of the algorithm the cipher implements. |
| private byte | |
| private int | |
| private int | |
| private void | |
| public void | init(boolean
whether or not we are for encryption. Irrelevant, as
encryption and decryption are the same. forEncryption, CipherParameters the parameters required to set up the cipher. params)Implements org. Initialise a HC-128 cipher. |
| private static int | |
| private static int | |
| public int | processBytes(byte[]
the input byte array. in, int the offset into the in array where the data to be processed starts. inOff, int the number of bytes to be processed. len, byte[] the output buffer the processed bytes go into. out, int the offset into the output byte array the processed data starts at. outOff)Implements org. process a block of bytes from in putting the result into out. |
| public void | |
| public byte | returnByte(byte
the byte to be processed. in)Implements org. encrypt/decrypt a single byte returning the result. |
| private static int | |
| private static int | |
| private int |
| buf | back to summary |
|---|---|
| private byte[] buf | |
| cnt | back to summary |
|---|---|
| private int cnt | |
| idx | back to summary |
|---|---|
| private int idx | |
| initialised | back to summary |
|---|---|
| private boolean initialised | |
| iv | back to summary |
|---|---|
| private byte[] iv | |
| key | back to summary |
|---|---|
| private byte[] key | |
| p | back to summary |
|---|---|
| private int[] p | |
| q | back to summary |
|---|---|
| private int[] q | |
| HC128Engine | back to summary |
|---|---|
| public HC128Engine() | |
| dim | back to summary |
|---|---|
| private static int dim(int x, int y) | |
| f1 | back to summary |
|---|---|
| private static int f1(int x) | |
| f2 | back to summary |
|---|---|
| private static int f2(int x) | |
| g1 | back to summary |
|---|---|
| private int g1(int x, int y, int z) | |
| g2 | back to summary |
|---|---|
| private int g2(int x, int y, int z) | |
| getAlgorithmName | back to summary |
|---|---|
| public String getAlgorithmName() Implements org. Doc from org. Return the name of the algorithm the cipher implements.
| |
| getByte | back to summary |
|---|---|
| private byte getByte() | |
| h1 | back to summary |
|---|---|
| private int h1(int x) | |
| h2 | back to summary |
|---|---|
| private int h2(int x) | |
| init | back to summary |
|---|---|
| private void init() | |
| init | back to summary |
|---|---|
| public void init(boolean forEncryption, CipherParameters params) throws IllegalArgumentException Implements org. Initialise a HC-128 cipher.
| |
| mod1024 | back to summary |
|---|---|
| private static int mod1024(int x) | |
| mod512 | back to summary |
|---|---|
| private static int mod512(int x) | |
| processBytes | back to summary |
|---|---|
| public int processBytes(byte[] in, int inOff, int len, byte[] out, int outOff) throws DataLengthException Implements org. Doc from org. process a block of bytes from in putting the result into out.
| |
| reset | back to summary |
|---|---|
| public void reset() Implements org. Doc from org. reset the cipher. This leaves it in the same state it was at after the last init (if there was one). | |
| returnByte | back to summary |
|---|---|
| public byte returnByte(byte in) Implements org. Doc from org. encrypt/decrypt a single byte returning the result.
| |
| rotateLeft | back to summary |
|---|---|
| private static int rotateLeft(int x, int bits) | |
| rotateRight | back to summary |
|---|---|
| private static int rotateRight(int x, int bits) | |
| step | back to summary |
|---|---|
| private int step() | |