openHiTLS API openHiTLS 0.1.0-Alpha1

◆ CRYPT_PkeyCtrl

Set and obtain internal parameters of pkey.

枚举值
CRYPT_CTRL_SET_ED25519_HASH_METHOD 

ED25519 Set the hash method.

CRYPT_CTRL_SET_RSA_EMSA_PKCSV15 

RSA set the signature padding mode to EMSA_PKCSV15.

CRYPT_CTRL_SET_RSA_EMSA_PSS 

RSA set the signature padding mode to EMSA_PSS.

CRYPT_CTRL_SET_RSA_SALT 

When the RSA algorithm is used for PSS signature, the salt data is specified. During signature, the user data address is directly saved to the key. And the user data is used for the next signature, the caller must ensure that the next signature is called within the life cycle of the salt data. This option is not recommended and is used only for KAT and self-verification.

CRYPT_CTRL_SET_ECC_POINT_FORMAT 

ECC PKEY set the point format. For the point format, see CRYPT_PKEY_PointFormat.

CRYPT_CTRL_GET_RSA_SALT 

Obtain the salt length of the RSA algorithm.

CRYPT_CTRL_GET_RSA_PADDING 

Obtain the padding mode of the RSA algorithm.

CRYPT_CTRL_SET_RSA_PADDING 

Set the padding mode of the RSA algorithm.

CRYPT_CTRL_GET_RSA_MD 

Obtain the MD algorithm of the RSA algorithm.

CRYPT_CTRL_GET_RSA_MGF 

Obtain the mgf algorithm when the RSA algorithm padding mode is PSS.

CRYPT_CTRL_SET_ECC_USE_COFACTOR_MODE 

Indicates whether to use the cofactor mode to prevent man-in-the-middle from tampering with the public key. Set this parameter to 1 when used or 0 when not used.

CRYPT_CTRL_SET_RSA_RSAES_OAEP 

RSA set the padding mode to RSAES_OAEP.

CRYPT_CTRL_SET_RSA_OAEP_LABEL 

RSA oaep padding and setting labels, used to generate hash values.

CRYPT_CTRL_SET_RSA_FLAG 

RSA set the flag.

CRYPT_CTRL_CLR_RSA_FLAG 

RSA clear the flag.

CRYPT_CTRL_SET_RSA_RSAES_PKCSV15 

RSA Set the encryption/decryption padding mode to RSAES_PKCSV15.

CRYPT_CTRL_SET_SM9_HASH_METHOD 

SM9 Set the hash method.

CRYPT_CTRL_SET_SM2_USER_ID 
CRYPT_CTRL_SET_SM2_HASH_METHOD 
CRYPT_CTRL_SET_SM2_SERVER 
CRYPT_CTRL_GENE_SM2_R 
CRYPT_CTRL_SET_SM2_R 
CRYPT_CTRL_SET_SM2_RANDOM 
CRYPT_CTRL_SET_SM2_PKG 
CRYPT_CTRL_SM2_GET_SEND_CHECK 
CRYPT_CTRL_SM2_DO_CHECK 
CRYPT_CTRL_SET_ED448_HASH_METHOD 

ed448 Set the hash method.

CRYPT_CTRL_SET_ED448_CONTEXT 

ed448 Set the context.

CRYPT_CTRL_SET_ED448_PREHASH 

ed448 Set the prehash mode.

CRYPT_CTRL_UP_REFERENCES 

The reference count value increases automatically. It is applicable to asymmetric algorithms such as 25519, RSA, and ECC.