Chapter 4 Using Crypto-C 109
Algorithms in Crypto-C
Digital Signatures
Composite operations for signing data: digest the data, then encrypt the BER encoding of the digest with
RSA.
BER-encoded digest is 34 bytes for 16-bit digests (MD2, MD5); min. RSA modulus is 45 bytes long.
BER-encoded digest is 35 bytes for 20-byte digests (SHA1); min. RSA modul us is 46 bytes long.
AI_MD2WithRSAEncryption MD2 digest with RSA encryption PKCS #1
AI_MD2WithRSAEncryptionBER MD2 digest with RSA encryption,
BER-encoded algorithm identifier
PKCS #1 a
AI_MD5WithRSAEncryption MD5 digest with RSA encryption PKCS #1
AI_MD5WithRSAEncryptionBER MD5 digest with RSA encryption,
BER-encoded algorithm identifier
PKCS #1 a
AI_SHA1WithRSAEncryption SHA1 digest with RSA encryption PKCS #1
AI_SHA1WithRSAEncryptionBER SHA1 digest with RSA encryption,
BER-encoded algorithm identifier
PKCS #1 a
Table 4-8 DSA Public-Key Cryptography
Algorithm Info Type Description BER
Parameter Generation
AI_DSAParamGen DSA parameter generation
Key Generation
AI_DSAKeyGen DSA key generation
Digital Signatures
AI_DSA DSA sign/verify a 20-byte input
AI_DSAWithSHA1 SHA1 digest with DSA sign/verify
AI_DSAWithSHA1_BER SHA1 digest with DSA sign/verify,
BER-encoded algorithm identifier
a
Table 4-7 RSA Public-Key Cryptography (Continued)
Algorithm Info Type Description Pad BER PEM