std1.0.0-beta-7 SafeC docs

std :: crypto::ec

Struct std::EcPrivateKey

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

struct EcPrivateKey {
    int curve;
    unsigned char d[EC_MAX_SCALAR];
    unsigned char pub[EC_MAX_POINT];
    unsigned long pub_len;
}

A private key with its curve and public point, from DER: SEC1 ECPrivateKey (RFC 5915) or PKCS#8 PrivateKeyInfo (RFC 5208) holding one.

Fields

§int curvesource
§unsigned char d[EC_MAX_SCALAR]source
§unsigned char pub[EC_MAX_POINT]source
§unsigned long pub_lensource

Methods

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