25 #ifndef BR_BEARSSL_RSA_H__ 26 #define BR_BEARSSL_RSA_H__ 279 const unsigned char *hash_oid,
size_t hash_len,
327 const br_prng_class **rnd,
const br_hash_class *dig,
328 const void *label,
size_t label_len,
330 void *dst,
size_t dst_max_len,
331 const void *src,
size_t src_len);
385 const unsigned char *hash,
size_t hash_len,
391 #define BR_HASH_OID_SHA1 \ 392 ((const unsigned char *)"\x05\x2B\x0E\x03\x02\x1A") 397 #define BR_HASH_OID_SHA224 \ 398 ((const unsigned char *)"\x09\x60\x86\x48\x01\x65\x03\x04\x02\x04") 403 #define BR_HASH_OID_SHA256 \ 404 ((const unsigned char *)"\x09\x60\x86\x48\x01\x65\x03\x04\x02\x01") 409 #define BR_HASH_OID_SHA384 \ 410 ((const unsigned char *)"\x09\x60\x86\x48\x01\x65\x03\x04\x02\x02") 415 #define BR_HASH_OID_SHA512 \ 416 ((const unsigned char *)"\x09\x60\x86\x48\x01\x65\x03\x04\x02\x03") 456 const br_hash_class *dig,
const void *label,
size_t label_len,
492 const unsigned char *hash_oid,
size_t hash_len,
520 const unsigned char *hash,
size_t hash_len,
556 const unsigned char *hash_oid,
size_t hash_len,
584 const unsigned char *hash,
size_t hash_len,
628 const unsigned char *hash_oid,
size_t hash_len,
664 const unsigned char *hash,
size_t hash_len,
748 const unsigned char *hash_oid,
size_t hash_len,
776 const unsigned char *hash,
size_t hash_len,
867 unsigned char *data,
size_t len);
886 const br_prng_class **rnd,
const br_hash_class *dig,
887 const void *label,
size_t label_len,
889 void *dst,
size_t dst_max_len,
890 const void *src,
size_t src_len);
906 const br_hash_class *dig,
const void *label,
size_t label_len,
926 const br_prng_class **rnd,
const br_hash_class *dig,
927 const void *label,
size_t label_len,
929 void *dst,
size_t dst_max_len,
930 const void *src,
size_t src_len);
946 const br_hash_class *dig,
const void *label,
size_t label_len,
966 const br_prng_class **rnd,
const br_hash_class *dig,
967 const void *label,
size_t label_len,
969 void *dst,
size_t dst_max_len,
970 const void *src,
size_t src_len);
986 const br_hash_class *dig,
const void *label,
size_t label_len,
1010 const br_prng_class **rnd,
const br_hash_class *dig,
1011 const void *label,
size_t label_len,
1013 void *dst,
size_t dst_max_len,
1014 const void *src,
size_t src_len);
1034 const br_hash_class *dig,
const void *label,
size_t label_len,
1048 #define BR_RSA_KBUF_PRIV_SIZE(size) (5 * (((size) + 15) >> 4)) 1061 #define BR_RSA_KBUF_PUB_SIZE(size) (4 + (((size) + 7) >> 3)) 1102 const br_prng_class **rng_ctx,
1105 unsigned size, uint32_t pubexp);
1122 const br_prng_class **rng_ctx,
1125 unsigned size, uint32_t pubexp);
1142 const br_prng_class **rng_ctx,
1145 unsigned size, uint32_t pubexp);
1166 const br_prng_class **rng_ctx,
1169 unsigned size, uint32_t pubexp);
size_t dqlen
Second reduced private exponent length (in bytes).
Definition: bearssl_rsa.h:199
size_t iqlen
CRT coefficient length (in bytes).
Definition: bearssl_rsa.h:203
RSA public key.
Definition: bearssl_rsa.h:161
uint32_t n_bitlen
Modulus bit length (in bits, exact value).
Definition: bearssl_rsa.h:183
size_t qlen
Second prime factor length (in bytes).
Definition: bearssl_rsa.h:191
size_t nlen
Modulus length (in bytes).
Definition: bearssl_rsa.h:165
unsigned char * n
Modulus.
Definition: bearssl_rsa.h:163
unsigned char * e
Public exponent.
Definition: bearssl_rsa.h:167
unsigned char * q
Second prime factor.
Definition: bearssl_rsa.h:189
size_t plen
First prime factor length (in bytes).
Definition: bearssl_rsa.h:187
unsigned char * dq
Second reduced private exponent.
Definition: bearssl_rsa.h:197
unsigned char * dp
First reduced private exponent.
Definition: bearssl_rsa.h:193
RSA private key.
Definition: bearssl_rsa.h:181
size_t elen
Public exponent length (in bytes).
Definition: bearssl_rsa.h:169
unsigned char * iq
CRT coefficient.
Definition: bearssl_rsa.h:201
size_t dplen
First reduced private exponent length (in bytes).
Definition: bearssl_rsa.h:195
unsigned char * p
First prime factor.
Definition: bearssl_rsa.h:185