scclib
Stable Cloud Computing C++ Library
|
Private key certificate utility. More...
#include <cert.h>
Static Public Member Functions | |
static void | parse (const BasePtr &, Bignum &, KeyAlgoType &, EccGfpPoint &) |
Parse from a sequence. More... | |
static void | parse (const DerDocument &doc, Bignum &priv, KeyAlgoType &alg, EccGfpPoint &pub) |
static BasePtr | dump (const Bignum &, const KeyAlgoType &, const EccGfpPoint &) |
Dump to a sequence. | |
Private key certificate utility.
From: https://tools.ietf.org/html/rfc5915
ECPrivateKey ::= SEQUENCE { version INTEGER { ecPrivkeyVer1(1) } (ecPrivkeyVer1), privateKey OCTET STRING, parameters [0] ECParameters {{ NamedCurve }} OPTIONAL, publicKey [1] BIT STRING OPTIONAL }
Note parameters and publickey are recommended, so this implementation will require them.
privateKey is an octet string of length ceiling (log2(n)/8) (where n is the order of the curve)
PEM certificate format: --—BEGIN EC PRIVATE KEY--— <ECPrivateKey>
|
static |