An ECC private key is described by this S-expression:
(private-key
(ecc
(p p-mpi)
(a a-mpi)
(b b-mpi)
(g g-point)
(n n-mpi)
(q q-point)
(d d-mpi)))
All point values are encoded in standard format; Libgcrypt does
currently only support uncompressed points, thus the first byte needs to
be 0x04.
The public key is similar with "private-key" replaced by "public-key" and no d-mpi.
If the domain parameters are well-known, the name of this curve may be used. For example
(private-key
(ecc
(curve "NIST P-192")
(q q-point)
(d d-mpi)))
The curve parameter may be given in any case and is used to replace
missing parameters.
Currently implemented curves are:
NIST P-1921.2.840.10045.3.1.1prime192v1secp192r1NIST P-224secp224r1NIST P-2561.2.840.10045.3.1.7prime256v1secp256r1NIST P-384secp384r1NIST P-521secp521r1OID.
or oid..