Inheritance diagram for SiDSA:
Public Member Functions | |
SiDSA (DSA *key) | |
constructor | |
virtual | ~SiDSA () |
destructor | |
virtual OFCondition | sign (const unsigned char *inputHash, unsigned long inputHashSize, E_MACType inputHashAlgorithm, unsigned char *outputSignature, unsigned long &outputSignatureSize) |
creates a signature. | |
virtual OFCondition | verify (const unsigned char *inputHash, unsigned long inputHashSize, E_MACType inputHashAlgorithm, const unsigned char *inputSignature, unsigned long inputSignatureSize, OFBool &verified) |
verifies a signature. | |
virtual unsigned long | getSize () const |
returns the size of a block of encrypted/decrypted ciphertext in bytes. | |
virtual E_KeyType | keyType () const |
returns the type of public key algorithm computed by this object | |
Private Member Functions | |
SiDSA (SiDSA &arg) | |
private undefined copy constructor | |
SiDSA & | operator= (SiDSA &arg) |
private undefined copy assignment operator | |
Private Attributes | |
DSA * | dsa |
DSA key used for signature/verification. |
Definition at line 49 of file sidsa.h.
SiDSA::SiDSA | ( | DSA * | key | ) |
constructor
pointer | to public DSA key |
virtual OFCondition SiDSA::sign | ( | const unsigned char * | inputHash, | |
unsigned long | inputHashSize, | |||
E_MACType | inputHashAlgorithm, | |||
unsigned char * | outputSignature, | |||
unsigned long & | outputSignatureSize | |||
) | [virtual] |
creates a signature.
inputHash | array of hash key bytes that are to be signed | |
inputHashSize | length of hash key array in bytes | |
inputHashAlgorithm | MAC algorithm used for creation of hash key. Ignored for DSA signatures. | |
outputSignature | pointer to array of at least getSize() which must be allocated by caller. | |
outputSignatureSize | returns the number of bytes written to outputSignature. |
Implements SiAlgorithm.
virtual OFCondition SiDSA::verify | ( | const unsigned char * | inputHash, | |
unsigned long | inputHashSize, | |||
E_MACType | inputHashAlgorithm, | |||
const unsigned char * | inputSignature, | |||
unsigned long | inputSignatureSize, | |||
OFBool & | verified | |||
) | [virtual] |
verifies a signature.
inputHash | array of bytes containing hash key to be verified against signature | |
inputHashSize | length of hash key array in bytes | |
inputHashAlgorithm | MAC algorithm used for creation of hash key. Ignored for DSA signatures. | |
inputSignature | array of bytes containing signature to be verified | |
inputSignatureSize | length of signature array in bytes | |
verified | returns whether the signature was successfully verified |
Implements SiAlgorithm.
virtual unsigned long SiDSA::getSize | ( | ) | const [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.
Implements SiAlgorithm.
virtual E_KeyType SiDSA::keyType | ( | ) | const [virtual] |
returns the type of public key algorithm computed by this object
Implements SiAlgorithm.