openHiTLS API openHiTLS 0.1.0-Alpha1
|
Algorithm related interfaces to be registered 更多...
类型定义 | |
typedef int32_t(* | CRYPT_RandBytesCallback) (uint8_t *buf, uint32_t len) |
Obtain the random number. | |
typedef HITLS_CRYPT_Key *(* | CRYPT_GenerateEcdhKeyPairCallback) (const HITLS_ECParameters *curveParams) |
ECDH: Generate a key pair based on elliptic curve parameters. | |
typedef HITLS_CRYPT_Key *(* | CRYPT_DupEcdhKeyCallback) (HITLS_CRYPT_Key *key) |
Deep copy key | |
typedef void(* | CRYPT_FreeEcdhKeyCallback) (HITLS_CRYPT_Key *key) |
Release the key. | |
typedef int32_t(* | CRYPT_GetEcdhEncodedPubKeyCallback) (HITLS_CRYPT_Key *key, uint8_t *pubKeyBuf, uint32_t bufLen, uint32_t *pubKeyLen) |
ECDH: Extract the public key data. | |
typedef int32_t(* | CRYPT_CalcEcdhSharedSecretCallback) (HITLS_CRYPT_Key *key, uint8_t *peerPubkey, uint32_t pubKeyLen, uint8_t *sharedSecret, uint32_t *sharedSecretLen) |
ECDH: Calculate the shared key based on the local key and peer public key. | |
typedef int32_t(* | CRYPT_Sm2CalcEcdhSharedSecretCallback) (HITLS_Sm2GenShareKeyParameters *sm2Params, uint8_t *sharedSecret, uint32_t *sharedSecretLen) |
SM2 calculates the shared key based on the local key and peer public key. | |
typedef HITLS_CRYPT_Key *(* | CRYPT_GenerateDhKeyBySecbitsCallback) (int32_t secbits) |
Generate a key pair based on secbits. | |
typedef HITLS_CRYPT_Key *(* | CRYPT_GenerateDhKeyByParamsCallback) (uint8_t *p, uint16_t plen, uint8_t *g, uint16_t glen) |
DH: Generate a key pair based on the dh parameter. | |
typedef HITLS_CRYPT_Key *(* | CRYPT_DupDhKeyCallback) (HITLS_CRYPT_Key *key) |
Deep copy key | |
typedef void(* | CRYPT_FreeDhKeyCallback) (HITLS_CRYPT_Key *key) |
Release the key. | |
typedef int32_t(* | CRYPT_DHGetParametersCallback) (HITLS_CRYPT_Key *key, uint8_t *p, uint16_t *plen, uint8_t *g, uint16_t *glen) |
DH: Obtain p g plen glen by using the key handle. | |
typedef int32_t(* | CRYPT_GetDhEncodedPubKeyCallback) (HITLS_CRYPT_Key *key, uint8_t *pubKeyBuf, uint32_t bufLen, uint32_t *pubKeyLen) |
DH: Extract the Dh public key data. | |
typedef int32_t(* | CRYPT_CalcDhSharedSecretCallback) (HITLS_CRYPT_Key *key, uint8_t *peerPubkey, uint32_t pubKeyLen, uint8_t *sharedSecret, uint32_t *sharedSecretLen) |
DH: Calculate the shared key based on the local key and peer public key. | |
typedef uint32_t(* | CRYPT_HmacSizeCallback) (HITLS_HashAlgo hashAlgo) |
Obtain the HMAC length based on the hash algorithm. | |
typedef HITLS_HMAC_Ctx *(* | CRYPT_HmacInitCallback) (HITLS_HashAlgo hashAlgo, const uint8_t *key, uint32_t len) |
Initialize the HMAC context. | |
typedef void(* | CRYPT_HmacFreeCallback) (HITLS_HMAC_Ctx *ctx) |
Release the HMAC context. | |
typedef int32_t(* | CRYPT_HmacUpdateCallback) (HITLS_HMAC_Ctx *ctx, const uint8_t *data, uint32_t len) |
Add the HMAC input data. | |
typedef int32_t(* | CRYPT_HmacFinalCallback) (HITLS_HMAC_Ctx *ctx, uint8_t *out, uint32_t *len) |
Output the HMAC result. | |
typedef int32_t(* | CRYPT_HmacCallback) (HITLS_HashAlgo hashAlgo, const uint8_t *key, uint32_t keyLen, const uint8_t *in, uint32_t inLen, uint8_t *out, uint32_t *outLen) |
Function for calculating the HMAC for a single time | |
typedef uint32_t(* | CRYPT_DigestSizeCallback) (HITLS_HashAlgo hashAlgo) |
Obtain the hash length. | |
typedef HITLS_HASH_Ctx *(* | CRYPT_DigestInitCallback) (HITLS_HashAlgo hashAlgo) |
Initialize the hash context. | |
typedef HITLS_HASH_Ctx *(* | CRYPT_DigestCopyCallback) (HITLS_HASH_Ctx *ctx) |
Copy the hash context. | |
typedef void(* | CRYPT_DigestFreeCallback) (HITLS_HASH_Ctx *ctx) |
Release the hash context. | |
typedef int32_t(* | CRYPT_DigestUpdateCallback) (HITLS_HASH_Ctx *ctx, const uint8_t *data, uint32_t len) |
Hash Add input data. | |
typedef int32_t(* | CRYPT_DigestFinalCallback) (HITLS_HASH_Ctx *ctx, uint8_t *out, uint32_t *len) |
Output the hash result. | |
typedef int32_t(* | CRYPT_DigestCallback) (HITLS_HashAlgo hashAlgo, const uint8_t *in, uint32_t inLen, uint8_t *out, uint32_t *outLen) |
Hash function | |
typedef int32_t(* | CRYPT_EncryptCallback) (const HITLS_CipherParameters *cipher, const uint8_t *in, uint32_t inLen, uint8_t *out, uint32_t *outLen) |
TLS encryption | |
typedef int32_t(* | CRYPT_DecryptCallback) (const HITLS_CipherParameters *cipher, const uint8_t *in, uint32_t inLen, uint8_t *out, uint32_t *outLen) |
TLS decryption | |
typedef int32_t(* | CRYPT_HkdfExtractCallback) (const HITLS_CRYPT_HkdfExtractInput *input, uint8_t *prk, uint32_t *prkLen) |
HKDF-Extract | |
typedef int32_t(* | CRYPT_HkdfExpandCallback) (const HITLS_CRYPT_HkdfExpandInput *input, uint8_t *okm, uint32_t okmLen) |
HKDF-Expand | |
Algorithm related interfaces to be registered
hitls maintenance and debugging