| Modifier and Type | Class and Description |
|---|---|
| public static class | CramerShoupCoreEngine.
CS exception for wrong cipher-texts |
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private CramerShoupKeyParameters | |
| private byte[] | |
| private static final BigInteger | |
| private SecureRandom |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public BigInteger | |
| public byte[] | |
| public BigInteger | |
| public CramerShoupCiphertext | |
| private BigInteger | |
| public int | Returns: maximum size for an input block.Return the maximum size for an input block to this engine. |
| public int | Returns: maximum size for an output block.Return the maximum size for an output block to this engine. |
| public void | init(boolean
whether this engine should encrypt or decrypt forEncryption, CipherParameters the necessary CramerShoup key parameters. param, String the label for labelled CS as label)Stringinitialise the CramerShoup engine. |
| public void | init(boolean
whether this engine should encrypt or decrypt forEncryption, CipherParameters the necessary CramerShoup key parameters. param)initialise the CramerShoup engine. |
| protected SecureRandom | |
| private boolean | isValidMessage(BigInteger m, BigInteger p)
just checking whether the message m is actually less than the group order p |
| forEncryption | back to summary |
|---|---|
| private boolean forEncryption | |
| key | back to summary |
|---|---|
| private CramerShoupKeyParameters key | |
| label | back to summary |
|---|---|
| private byte[] label | |
| ONE | back to summary |
|---|---|
| private static final BigInteger ONE | |
| random | back to summary |
|---|---|
| private SecureRandom random | |
| CramerShoupCoreEngine | back to summary |
|---|---|
| public CramerShoupCoreEngine() | |
| convertInput | back to summary |
|---|---|
| public BigInteger convertInput(byte[] in, int inOff, int inLen) | |
| convertOutput | back to summary |
|---|---|
| public byte[] convertOutput(BigInteger result) | |
| decryptBlock | back to summary |
|---|---|
| public BigInteger decryptBlock(CramerShoupCiphertext input) throws CramerShoupCiphertextException | |
| encryptBlock | back to summary |
|---|---|
| public CramerShoupCiphertext encryptBlock(BigInteger input) | |
| generateRandomElement | back to summary |
|---|---|
| private BigInteger generateRandomElement(BigInteger p, SecureRandom random) | |
| getInputBlockSize | back to summary |
|---|---|
| public int getInputBlockSize() Return the maximum size for an input block to this engine. For Cramer Shoup this is always one byte less than the key size on encryption, and the same length as the key size on decryption. Todo correct?
| |
| getOutputBlockSize | back to summary |
|---|---|
| public int getOutputBlockSize() Return the maximum size for an output block to this engine. For Cramer Shoup this is always one byte less than the key size on decryption, and the same length as the key size on encryption. Todo correct?
| |
| init | back to summary |
|---|---|
| public void init(boolean forEncryption, CipherParameters param, String label) initialise the CramerShoup engine.
| |
| init | back to summary |
|---|---|
| public void init(boolean forEncryption, CipherParameters param) initialise the CramerShoup engine.
| |
| initSecureRandom | back to summary |
|---|---|
| protected SecureRandom initSecureRandom(boolean needed, SecureRandom provided) | |
| isValidMessage | back to summary |
|---|---|
| private boolean isValidMessage(BigInteger m, BigInteger p) just checking whether the message m is actually less than the group order p | |
| Modifier and Type | Field and Description |
|---|---|
| private static final long |
| Access | Constructor and Description |
|---|---|
| public |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| CramerShoupCiphertextException | back to summary |
|---|---|
| public CramerShoupCiphertextException(String msg) | |