std1.0.0-beta-7 SafeC docs

std :: crypto::rsa

Struct std::RsaPublicKey

#include <std/crypto/rsa.h> source

struct RsaPublicKey {
    struct BnMont n;
    unsigned char e[8];
    unsigned long e_len;
    unsigned long bits;
}

Fields

the modulus

§unsigned char e[8]source

public exponent, big-endian

§unsigned long e_lensource
§unsigned long bitssource

modulus length in bits

Methods

§int init_der([]const unsigned char der)source · definition

From a DER RSAPublicKey (SEQUENCE { modulus, publicExponent }: the BIT STRING content of an rsaEncryption SubjectPublicKeyInfo). 0 if malformed, under RSA_MIN_BITS or over RSA_MAX_BYTES, or e is even, 1 or wider than 64 bits.