pure virtual base class of the public key crypto systems used for signature creation and verification.
More...
|
| SiAlgorithm () |
| default constructor
|
|
virtual | ~SiAlgorithm () |
| destructor
|
|
virtual OFCondition | sign (const unsigned char *inputHash, unsigned long inputHashSize, E_MACType inputHashAlgorithm, unsigned char *outputSignature, unsigned long &outputSignatureSize)=0 |
| creates a signature. More...
|
|
virtual OFCondition | verify (const unsigned char *inputHash, unsigned long inputHashSize, E_MACType inputHashAlgorithm, const unsigned char *inputSignature, unsigned long inputSignatureSize, OFBool &verified)=0 |
| verifies a signature. More...
|
|
virtual unsigned long | getSize () const =0 |
| returns the size of a block of encrypted/decrypted ciphertext in bytes. More...
|
|
virtual E_KeyType | keyType () const =0 |
| returns the type of public key algorithm computed by this object More...
|
|
pure virtual base class of the public key crypto systems used for signature creation and verification.
All public key algorithm classes should inherit from this class. Instances of derived classes contain a single private or public key.
virtual unsigned long SiAlgorithm::getSize |
( |
| ) |
const |
|
pure virtual |
returns the size of a block of encrypted/decrypted ciphertext in bytes.
The result depends on the public key algorithm, key size and padding scheme. In general the input to decrypt() or encrypt() must be less than or equal to this block size. The output of decrypt() or encrypt() is always equal to this block size.
- Returns
- block size for this public key cryptosystem and key
Implemented in SiRSA, SiDSA, and SiECDSA.