KM_EncodeECParamsP

#include“kmlib.h”
 

Windows library: Kmlib.lib

UNIX library: Libkmlib.a

CK_RV KM_EncodeECParamsP(
CK_BYTE_PTR prime,    CK_SIZE primeLen,
CK_BYTE_PTR curveA,   CK_SIZE curveALen,
CK_BYTE_PTR curveB,   CK_SIZE curveBLen,
CK_BYTE_PTR curveSeed,CK_SIZE curveSeedLen,
CK_BYTE_PTR baseX,    CK_SIZE baseXLen,
CK_BYTE_PTR baseY,    CK_SIZE baseYLen,
CK_BYTE_PTR bpOrder,  CK_SIZE bpOrderLen,
CK_BYTE_PTR cofactor, CK_SIZE cofactorLen,
CK_BYTE_PTR result,   CK_SIZE * resultLen
);
 

Do DER enc of ECC Domain Parameters Prime

All integer values are variable length big endian numbers with optional leading zeros. Integer lengths are all in bytes.

Parameter Description
prime Prime modulus
primeLen Prime modulus len
curveA Elliptic Curve coefficient a
curveALen Elliptic Curve coefficient a length
curveB Elliptic Curve coefficient b
curveBLen Elliptic Curve coefficient b length
curveSeed Seed (optional may be NULL)
curveSeedLen Seed length
baseX Elliptic Curve point X coord
baseXLen Elliptic Curve point X coord length
baseY Elliptic Curve point Y coord
baseYLen Elliptic Curve point Y coord length
bpOrder Order n of the Base Point
bpOrderLen Order n of the Base Point length
cofactor The integer h = #E(Fq)/n (optional)
cofactorLen h length
result Resultant Encoding (length prediction supported if NULL)
resultLen Buffer len/Length of resultant encoding
Return Status of operation. CKR_OK if ok