an RSA public key of up to 4096 bits: the signature verification of RSASSA-PKCS1-v1_5 (RFC 8017 8.2.2)
More...
#include <dx_crypto_rsa.h>
|
| bool | key (const uint8_t *modulus, size_t ms, const uint8_t *exponent, size_t exponents) noexcept |
| | the key: modulus and public exponent as big endian bytes (an INTEGER's content); false when the modulus is even, too large or the exponent 0
|
| bool | power (const uint8_t *signature, size_t size, uint8_t *out) noexcept |
| | the encoded message EM= signature^e mod n as bytes: false when the signature is not one of this key (size, or no smaller than n)
|
| bool | verify (const uint8_t *digestinfo, size_t size, const uint8_t *signature, size_t signatures) noexcept |
| | RSASSA-PKCS1-v1_5 verification: EM= 00 01 FF.. 00 T, T the DigestInfo (RFC 8017 9.2) - at least 8 FF octets.
|
|
| static constexpr size_t | bits = 4096 |
| static constexpr size_t | limbs = bits/ 32 |
an RSA public key of up to 4096 bits: the signature verification of RSASSA-PKCS1-v1_5 (RFC 8017 8.2.2)
Verification only - no private key ever - so the arithmetic (Montgomery products, base 2^32) needs no constant time; the work buffers are members, the stack stays small for the kernel.
◆ key()
| bool dx::crypto::rsa::key |
( |
const uint8_t * | modulus, |
|
|
size_t | ms, |
|
|
const uint8_t * | exponent, |
|
|
size_t | exponents ) |
|
inlinenoexcept |
the key: modulus and public exponent as big endian bytes (an INTEGER's content); false when the modulus is even, too large or the exponent 0
◆ power()
| bool dx::crypto::rsa::power |
( |
const uint8_t * | signature, |
|
|
size_t | size, |
|
|
uint8_t * | out ) |
|
inlinenoexcept |
the encoded message EM= signature^e mod n as bytes: false when the signature is not one of this key (size, or no smaller than n)
◆ verify()
| bool dx::crypto::rsa::verify |
( |
const uint8_t * | digestinfo, |
|
|
size_t | size, |
|
|
const uint8_t * | signature, |
|
|
size_t | signatures ) |
|
inlinenoexcept |
RSASSA-PKCS1-v1_5 verification: EM= 00 01 FF.. 00 T, T the DigestInfo (RFC 8017 9.2) - at least 8 FF octets.
◆ bits
| size_t dx::crypto::rsa::bits = 4096 |
|
staticconstexpr |
◆ limbs
| size_t dx::crypto::rsa::limbs = bits/ 32 |
|
static |
The documentation for this class was generated from the following file: