Skip to content

Operations for Signing and Verifying with ECCSI Key

More...

Functions

Name
int wc_MakeEccsiPair(EccsiKey * key, WC_RNG * rng, enum wc_HashType hashType, const byte * id, word32 idSz, mp_int * ssk, ecc_point * pvt)
int wc_ValidateEccsiPair(EccsiKey * key, enum wc_HashType hashType, const byte * id, word32 idSz, const mp_int * ssk, ecc_point * pvt, int * valid)
int wc_ValidateEccsiPvt(EccsiKey * key, const ecc_point * pvt, int * valid)
int wc_EncodeEccsiPair(const EccsiKey * key, mp_int * ssk, ecc_point * pvt, byte * data, word32 * sz)
int wc_EncodeEccsiSsk(const EccsiKey * key, mp_int * ssk, byte * data, word32 * sz)
int wc_EncodeEccsiPvt(const EccsiKey * key, ecc_point * pvt, byte * data, word32 * sz, int raw)
int wc_DecodeEccsiPair(const EccsiKey * key, const byte * data, word32 sz, mp_int * ssk, ecc_point * pvt)
int wc_DecodeEccsiSsk(const EccsiKey * key, const byte * data, word32 sz, mp_int * ssk)
int wc_DecodeEccsiPvt(const EccsiKey * key, const byte * data, word32 sz, ecc_point * pvt)
int wc_DecodeEccsiPvtFromSig(const EccsiKey * key, const byte * sig, word32 sz, ecc_point * pvt)
int wc_HashEccsiId(EccsiKey * key, enum wc_HashType hashType, const byte * id, word32 idSz, ecc_point * pvt, byte * hash, byte * hashSz)
int wc_SignEccsiHash(EccsiKey * key, WC_RNG * rng, enum wc_HashType hashType, const byte * msg, word32 msgSz, byte * sig, word32 * sigSz)
int wc_VerifyEccsiHash(EccsiKey * key, enum wc_HashType hashType, const byte * msg, word32 msgSz, const byte * sig, word32 sigSz, int * verified)

Detailed Description

These operations are for signing and verifying with ECCSI keys.

Make an ECCSI key pair (wc_MakeEccsiPair()) with the signer's ID for use when signing.

Validate the ECCSI key pair (wc_ValidateEccsiPair()) with the signer's ID.

Validate the ECCSI Public Validation Token (PVT) (wc_ValidateEccsiPvt()).

Encode the ECCSI key pair (wc_EncodeEccsiPair()) for transfer to client.

Encode the ECCSI SSK (wc_EncodeEccsiSsk()) for transfer to client.

Encode the ECCSI PVT (wc_EncodeEccsiPvt()) for transfer to verifier.

Decode the ECCSI key pair (wc_DecodeEccsiPair()) on client for signing.

Decode the ECCSI SSK (wc_DecodeEccsiSsk()) on client for signing.

Decode the ECCSI PVT (wc_DecodeEccsiPvt()) on client for signing.

Decode the ECCSI PVT from the signature (wc_DecodeEccsiPvtFromSig()) on client for verifying.

Calculate hash of the ID (wc_HashEccsiId()) for signing/verifying using ID and Public Validation Token (PVT).

Sign (wc_SignEccsiHash()) a message with the hash of the ID and the Secret Signing Key (SSK) and Public Validation Token (PVT).

Verify (wc_VerifyEccsiHash()) a message with the hash of the signer's ID.

Functions Documentation

function wc_MakeEccsiPair

int wc_MakeEccsiPair(
    EccsiKey * key,
    WC_RNG * rng,
    enum wc_HashType hashType,
    const byte * id,
    word32 idSz,
    mp_int * ssk,
    ecc_point * pvt
)

function wc_ValidateEccsiPair

int wc_ValidateEccsiPair(
    EccsiKey * key,
    enum wc_HashType hashType,
    const byte * id,
    word32 idSz,
    const mp_int * ssk,
    ecc_point * pvt,
    int * valid
)

function wc_ValidateEccsiPvt

int wc_ValidateEccsiPvt(
    EccsiKey * key,
    const ecc_point * pvt,
    int * valid
)

function wc_EncodeEccsiPair

int wc_EncodeEccsiPair(
    const EccsiKey * key,
    mp_int * ssk,
    ecc_point * pvt,
    byte * data,
    word32 * sz
)

function wc_EncodeEccsiSsk

int wc_EncodeEccsiSsk(
    const EccsiKey * key,
    mp_int * ssk,
    byte * data,
    word32 * sz
)

function wc_EncodeEccsiPvt

int wc_EncodeEccsiPvt(
    const EccsiKey * key,
    ecc_point * pvt,
    byte * data,
    word32 * sz,
    int raw
)

function wc_DecodeEccsiPair

int wc_DecodeEccsiPair(
    const EccsiKey * key,
    const byte * data,
    word32 sz,
    mp_int * ssk,
    ecc_point * pvt
)

function wc_DecodeEccsiSsk

int wc_DecodeEccsiSsk(
    const EccsiKey * key,
    const byte * data,
    word32 sz,
    mp_int * ssk
)

function wc_DecodeEccsiPvt

int wc_DecodeEccsiPvt(
    const EccsiKey * key,
    const byte * data,
    word32 sz,
    ecc_point * pvt
)

function wc_DecodeEccsiPvtFromSig

int wc_DecodeEccsiPvtFromSig(
    const EccsiKey * key,
    const byte * sig,
    word32 sz,
    ecc_point * pvt
)

function wc_HashEccsiId

int wc_HashEccsiId(
    EccsiKey * key,
    enum wc_HashType hashType,
    const byte * id,
    word32 idSz,
    ecc_point * pvt,
    byte * hash,
    byte * hashSz
)

function wc_SignEccsiHash

int wc_SignEccsiHash(
    EccsiKey * key,
    WC_RNG * rng,
    enum wc_HashType hashType,
    const byte * msg,
    word32 msgSz,
    byte * sig,
    word32 * sigSz
)

function wc_VerifyEccsiHash

int wc_VerifyEccsiHash(
    EccsiKey * key,
    enum wc_HashType hashType,
    const byte * msg,
    word32 msgSz,
    const byte * sig,
    word32 sigSz,
    int * verified
)

Updated on 2024-03-19 at 01:20:40 +0000