Platform SDK: Cryptography

PKCS Hash Algorithm Encoding

All RSA digital signature blocks contain an ASN.1 encoded hash algorithm identification string. The following table lists the encoding for the algorithms supported by the Microsoft Base Cryptographic Provider. These algorithms are also supported by most other RSA CSPs.

Algorithm Encoding
MD2 10 04 00 05 02 02 0d f7
86 48 86 2a 08 06 0c 30
20 30
MD4 10 04 00 05 04 02 0d f7
86 48 86 2a 08 06 0c 300
20 30
MD5 10 04 00 05 05 02 0d f7
86 48 86 2a 08 06 0c 30
20 30
SHA 14 04 00 05 1a 02 03 0e
2b 05 06 09 30 21 30

The encoded OID strings shown in the previous table include wrapper bytes. For example, the encoded string shown for SHA contains the following information (for clarity, the bytes are in reverse order).