17 #ifndef __CRYPTO_INTERFACE_QS_HEADER__ 18 #define __CRYPTO_INTERFACE_QS_HEADER__ 20 #include "../common/random.h" 21 #include "../cap/capdecl.h" 31 #ifndef MOC_QS_KEM_DEFAULT_ALG 32 #define MOC_QS_KEM_DEFAULT_ALG cid_QS_KEM_KYBER_512 35 #ifndef MOC_QS_SIG_DEFAULT_ALG 36 #define MOC_QS_SIG_DEFAULT_ALG cid_QS_SIG_DILITHIUM_2 51 MocAsymKey pSecretKey;
52 MocAsymKey pPublicKey;
MOC_EXTERN MSTATUS CRYPTO_INTERFACE_QS_deleteCtx(QS_CTX **ppCtx)
Deletes a QS context.
MOC_EXTERN MSTATUS CRYPTO_INTERFACE_QS_generateKeyPair(QS_CTX *pCtx, RNGFun rngFun, void *pRngFunArg)
Generates a new key pair within a QS context.
MOC_EXTERN MSTATUS CRYPTO_INTERFACE_QS_getPublicKey(QS_CTX *pCtx, ubyte *pPublicKey, ubyte4 pubLen)
Gets the public key from a QS context.
MOC_EXTERN MSTATUS CRYPTO_INTERFACE_QS_getPublicKeyAlloc(QS_CTX *pCtx, ubyte **ppPublicKey, ubyte4 *pPubLen)
Gets the public key from a QS context and allocates a buffer for it.
Context structure to hold the appropriate quantum safe asymmetric keys.
Definition: crypto_interface_qs.h:49
MOC_EXTERN MSTATUS CRYPTO_INTERFACE_QS_cloneCtx(QS_CTX **ppNewCtx, QS_CTX *pCtx)
Clones a QS context.
MOC_EXTERN MSTATUS CRYPTO_INTERFACE_QS_getPublicKeyLen(QS_CTX *pCtx, ubyte4 *pPubLen)
Gets the length of a public key associated with a QS context in bytes.
MOC_EXTERN MSTATUS CRYPTO_INTERFACE_QS_getPublicKeyLenFromAlgo(ubyte4 algo, ubyte4 *pPubLen)
Gets the length of a public key associated with a QS algorithm in bytes.
MOC_EXTERN MSTATUS CRYPTO_INTERFACE_QS_setPublicKey(QS_CTX *pCtx, ubyte *pPublicKey, ubyte4 pubLen)
Sets the public key within a QS context.
MOC_EXTERN MSTATUS CRYPTO_INTERFACE_QS_getAlg(QS_CTX *pCtx, ubyte4 *pAlg)
Gets tha algorithm identifier from the context.
MOC_EXTERN MSTATUS CRYPTO_INTERFACE_QS_equalKey(QS_CTX *pCtx1, QS_CTX *pCtx2, byteBoolean *pRes)
Compares public key value of two QS contexts.
MOC_EXTERN MSTATUS CRYPTO_INTERFACE_QS_newCtx(QS_CTX **ppNewCtx, ubyte4 algo)
Creates a new QS context.