CRSAPKCS1v15Verifier Class Reference

#include <asymmetric.h>

class CRSAPKCS1v15Verifier : public CRSAVerifier

Detailed Description

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.

Member Attribute Documentation

iPadding

CPaddingPKCS1Signature *iPadding[protected]

The PKCS#1 v1.5 signature padding

iPublicKey

const CRSAPublicKey &iPublicKey[protected]

The RSA public key to be used for verification

Constructor & Destructor Documentation

CRSAPKCS1v15Verifier ( const CRSAPublicKey & )

CRSAPKCS1v15Verifier(const CRSAPublicKey &aKey)[protected]

~CRSAPKCS1v15Verifier ( void )

~CRSAPKCS1v15Verifier(void)[virtual]

The destructor frees all resources owned by the object, prior to its destruction.

Member Function Documentation

ConstructL ( void )

voidConstructL(void)[protected]

InverseSignLC ( const CRSASignature & )

HBufC8 *InverseSignLC(const CRSASignature &aSignature)const [virtual]

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
aSignatureThe signature to be verified
Return Value
A pointer to a new buffer containing the result of the operation. The pointer is left on the cleanup stack.

MaxInputLength ( void )

TInt MaxInputLength(void)const [virtual]

Gets the maximum size of input accepted by this object.

Return Value
The maximum length allowed in bytes

MaxOutputLength ( void )

TInt MaxOutputLength(void)const [virtual]

Gets the maximum size of output that can be generated by this object.

Return Value
The maximum output length in bytes

NewL ( const CRSAPublicKey & )

IMPORT_C CRSAPKCS1v15Verifier *NewL(const CRSAPublicKey &aKey)[static]

Creates a new CRSAPKCS1v15Verifier object from a specified RSA public key.

Parameters
aKeyThe RSA public key to be used for verifying
Return Value
A pointer to the new CRSAPKCS1v15Verifier object
Leave Codes
KErrKeySizeIf the key length is too small

NewLC ( const CRSAPublicKey & )

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
aKeyThe RSA public key to be used for verifying
Return Value
A pointer to the new CRSAPKCS1v15Verifier object
Leave Codes
KErrKeySizeIf the key length is too small