| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private boolean | |
| private NaccacheSternKeyParameters | |
| private Vector | |
| private static BigInteger | |
| private static BigInteger |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public byte[] | Returns: encrypt((block1 + block2) mod sigma)the first encrypted block block1, byte[] the second encrypted block block2)Adds the contents of two encrypted blocks mod sigma |
| private static BigInteger | Returns: an integer x for that x % p_i == c_ithe congruences c_i congruences, Vector<E> the primes p_i primes)Computes the integer x that is expressed through the given primes and the congruences with the chinese remainder theorem (CRT). |
| public byte[] | Returns: The byte[] representation of the encrypted BigInteger (i.e. crypted.toByteArray())The BigInteger to encrypt plain)Encrypts a BigInteger aka Plaintext with the public key. |
| public int | getInputBlockSize()
Implements org. |
| public int | getOutputBlockSize()
Implements org. |
| public void | init(boolean
if true the cipher is initialised for
encryption, if false for decryption. forEncryption, CipherParameters the key and other data required by the cipher. param)Implements org. |
| public byte[] | processBlock(byte[]
the input data in, int offset into the in array where the data starts inOff, int the length of the block to be processed. len)Implements org. |
| public byte[] | Returns: the data after it went through the NaccacheSternEngine.the data to be processed data)Convenience Method for data exchange with the cipher. |
| public void |
| debug | back to summary |
|---|---|
| private boolean debug | |
| forEncryption | back to summary |
|---|---|
| private boolean forEncryption | |
| key | back to summary |
|---|---|
| private NaccacheSternKeyParameters key | |
| lookup | back to summary |
|---|---|
| private Vector<E>[] lookup | |
| ONE | back to summary |
|---|---|
| private static BigInteger ONE | |
| ZERO | back to summary |
|---|---|
| private static BigInteger ZERO | |
| NaccacheSternEngine | back to summary |
|---|---|
| public NaccacheSternEngine() | |
| addCryptedBlocks | back to summary |
|---|---|
| public byte[] addCryptedBlocks(byte[] block1, byte[] block2) throws InvalidCipherTextException Adds the contents of two encrypted blocks mod sigma
| |
| chineseRemainder | back to summary |
|---|---|
| private static BigInteger chineseRemainder(Vector<E> congruences, Vector<E> primes) Computes the integer x that is expressed through the given primes and the congruences with the chinese remainder theorem (CRT).
| |
| encrypt | back to summary |
|---|---|
| public byte[] encrypt(BigInteger plain) Encrypts a BigInteger aka Plaintext with the public key.
| |
| getInputBlockSize | back to summary |
|---|---|
| public int getInputBlockSize() Implements org. Returns the input block size of this algorithm.
| |
| getOutputBlockSize | back to summary |
|---|---|
| public int getOutputBlockSize() Implements org. Returns the output block size of this algorithm.
| |
| init | back to summary |
|---|---|
| public void init(boolean forEncryption, CipherParameters param) Implements org. Initializes this algorithm. Must be called before all other Functions.
| |
| processBlock | back to summary |
|---|---|
| public byte[] processBlock(byte[] in, int inOff, int len) throws InvalidCipherTextException Implements org. Process a single Block using the Naccache-Stern algorithm.
| |
| processData | back to summary |
|---|---|
| public byte[] processData(byte[] data) throws InvalidCipherTextException Convenience Method for data exchange with the cipher. Determines blocksize and splits data to blocksize.
| |
| setDebug | back to summary |
|---|---|
| public void setDebug(boolean debug) | |