#include <asymmetric.h>
class CRSAPKCS1v15Verifier : public CRSAVerifier |
Protected Attributes | |
---|---|
CPaddingPKCS1Signature * | iPadding |
const CRSAPublicKey & | iPublicKey |
Public Member Functions | |
---|---|
virtual | ~CRSAPKCS1v15Verifier(void) |
virtual HBufC8 * | InverseSignLC(const CRSASignature &) |
virtual TInt | MaxInputLength(void) |
virtual TInt | MaxOutputLength(void) |
IMPORT_C CRSAPKCS1v15Verifier * | NewL(const CRSAPublicKey &) |
IMPORT_C CRSAPKCS1v15Verifier * | NewLC(const CRSAPublicKey &) |
Protected Member Functions | |
---|---|
CRSAPKCS1v15Verifier(const CRSAPublicKey &) | |
void | ConstructL(void) |
This class verifies RSA signatures given a message and its supposed signature. It follows the RSA PKCS#1 v1.5 with PKCS#1 v1.5 padding specification with the following exception: the VerifyL() function does not hash or in any way manipulate the input data before checking. Thus in order to verify RSA signatures in PKCS#1 v1.5 format, the input data needs to follow PKCS#1 v1.5 specification, i.e. be ASN.1 encoded and prefixed by ASN.1 encoded digestId.
const CRSAPublicKey & | iPublicKey | [protected] |
The RSA public key to be used for verification
CRSAPKCS1v15Verifier | ( | const CRSAPublicKey & | aKey | ) | [protected] |
~CRSAPKCS1v15Verifier | ( | void | ) | [virtual] |
The destructor frees all resources owned by the object, prior to its destruction.
void | ConstructL | ( | void | ) | [protected] |
HBufC8 * | InverseSignLC | ( | const CRSASignature & | aSignature | ) | const [virtual] |
Reimplemented from CRSAVerifier::InverseSignLC(const CRSASignature &)const
Performs a decryption operation on a signature using the public key.
This is the inverse of the sign operation, which performs a encryption operation on its input data using the private key. Although this can be used to verify signatures, CRSAVerifier::VerifyL should be used in preference. This method is however required by some security protocols.
Parameters | |
---|---|
aSignature | The signature to be verified |
TInt | MaxInputLength | ( | void | ) | const [virtual] |
Reimplemented from MSignatureSystem::MaxInputLength(void)const
Gets the maximum size of input accepted by this object.
TInt | MaxOutputLength | ( | void | ) | const [virtual] |
Reimplemented from CRSAVerifier::MaxOutputLength(void)const
Gets the maximum size of output that can be generated by this object.
IMPORT_C CRSAPKCS1v15Verifier * | NewL | ( | const CRSAPublicKey & | aKey | ) | [static] |
Creates a new CRSAPKCS1v15Verifier object from a specified RSA public key.
Parameters | |
---|---|
aKey | The RSA public key to be used for verifying |
Leave Codes | |
---|---|
KErrKeySize | If the key length is too small |
IMPORT_C CRSAPKCS1v15Verifier * | NewLC | ( | const CRSAPublicKey & | aKey | ) | [static] |
Creates a new CRSAPKCS1v15Verifier object from a specified RSA public key.
The returned pointer is put onto the cleanup stack.
Parameters | |
---|---|
aKey | The RSA public key to be used for verifying |
Leave Codes | |
---|---|
KErrKeySize | If the key length is too small |