Added encoded OID for hash functions (for use with PKCS#1 v1.5 signatures) into the public API.
This commit is contained in:
parent
81437e1175
commit
7f343eedfc
3 changed files with 40 additions and 50 deletions
|
|
@ -332,6 +332,36 @@ typedef uint32_t (*br_rsa_pkcs1_sign)(const unsigned char *hash_oid,
|
|||
const unsigned char *hash, size_t hash_len,
|
||||
const br_rsa_private_key *sk, unsigned char *x);
|
||||
|
||||
/**
|
||||
* \brief Encoded OID for SHA-1 (in RSA PKCS#1 signatures).
|
||||
*/
|
||||
#define BR_HASH_OID_SHA1 \
|
||||
((const unsigned char *)"\x05\x2B\x0E\x03\x02\x1A")
|
||||
|
||||
/**
|
||||
* \brief Encoded OID for SHA-224 (in RSA PKCS#1 signatures).
|
||||
*/
|
||||
#define BR_HASH_OID_SHA224 \
|
||||
((const unsigned char *)"\x09\x60\x86\x48\x01\x65\x03\x04\x02\x04")
|
||||
|
||||
/**
|
||||
* \brief Encoded OID for SHA-256 (in RSA PKCS#1 signatures).
|
||||
*/
|
||||
#define BR_HASH_OID_SHA256 \
|
||||
((const unsigned char *)"\x09\x60\x86\x48\x01\x65\x03\x04\x02\x01")
|
||||
|
||||
/**
|
||||
* \brief Encoded OID for SHA-384 (in RSA PKCS#1 signatures).
|
||||
*/
|
||||
#define BR_HASH_OID_SHA384 \
|
||||
((const unsigned char *)"\x09\x60\x86\x48\x01\x65\x03\x04\x02\x02")
|
||||
|
||||
/**
|
||||
* \brief Encoded OID for SHA-512 (in RSA PKCS#1 signatures).
|
||||
*/
|
||||
#define BR_HASH_OID_SHA512 \
|
||||
((const unsigned char *)"\x09\x60\x86\x48\x01\x65\x03\x04\x02\x03")
|
||||
|
||||
/*
|
||||
* RSA "i32" engine. Integers are internally represented as arrays of
|
||||
* 32-bit integers, and the core multiplication primitive is the
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue