scclib
Stable Cloud Computing C++ Library
Static Public Member Functions | List of all members
scc::crypto::EcPrivateKeyCert Struct Reference

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.
 

Detailed Description

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>

Definition at line 297 of file cert.h.

Member Function Documentation

◆ parse()

void EcPrivateKeyCert::parse ( const BasePtr &  b,
Bignum priv,
KeyAlgoType algo,
EccGfpPoint pub 
)
static

Parse from a sequence.

Throws exception on error.

Definition at line 405 of file cert.cc.


The documentation for this struct was generated from the following files: