public class CramerShoupCoreEngine extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
CramerShoupCoreEngine.CramerShoupCiphertextException
CS exception for wrong cipher-texts
|
| Constructor and Description |
|---|
CramerShoupCoreEngine() |
| Modifier and Type | Method and Description |
|---|---|
BigInteger |
convertInput(byte[] in,
int inOff,
int inLen) |
byte[] |
convertOutput(BigInteger result) |
BigInteger |
decryptBlock(CramerShoupCiphertext input) |
CramerShoupCiphertext |
encryptBlock(BigInteger input) |
int |
getInputBlockSize()
Return the maximum size for an input block to this engine.
|
int |
getOutputBlockSize()
Return the maximum size for an output block to this engine.
|
void |
init(boolean forEncryption,
CipherParameters param)
initialise the CramerShoup engine.
|
void |
init(boolean forEncryption,
CipherParameters param,
String label)
initialise the CramerShoup engine.
|
protected SecureRandom |
initSecureRandom(boolean needed,
SecureRandom provided) |
public void init(boolean forEncryption,
CipherParameters param,
String label)
forEncryption - whether this engine should encrypt or decryptparam - the necessary CramerShoup key parameters.label - the label for labelled CS as Stringpublic void init(boolean forEncryption,
CipherParameters param)
forEncryption - whether this engine should encrypt or decryptparam - the necessary CramerShoup key parameters.public int getInputBlockSize()
public int getOutputBlockSize()
public BigInteger convertInput(byte[] in, int inOff, int inLen)
public byte[] convertOutput(BigInteger result)
public CramerShoupCiphertext encryptBlock(BigInteger input)
public BigInteger decryptBlock(CramerShoupCiphertext input) throws CramerShoupCoreEngine.CramerShoupCiphertextException
protected SecureRandom initSecureRandom(boolean needed, SecureRandom provided)
Copyright © 2015–2020 The veraPDF Consortium. All rights reserved.