Lines Matching refs:key
19 * Description: Contains key generation, signature verify,
20 * encryption and decryption, key derivation, key agreement, etc. \n
92 * @brief Refresh key info and root key info.CNcomment:刷新密钥信息和根密钥信息。CNend
95 * Refresh key info and root key info.CNcomment:刷新密钥信息和根密钥信息。CNend
110 * @brief Generate key Only ED25519 algorithm key pair generation is supported The number of local storage keys.
114 * Generate key Only ED25519 algorithm key pair generation is supported The number of local storage keys
115 (including generated ED25519 public-private key pairs imported ED25519 public keys) is limited to 16.
120 * @param key_alias [IN] type #const struct hks_blob *,key alias, constraint condition:key_alias->size <= 64.
122 * @param key_param [IN] type #const struct hks_key_param *,The parameter of the key which need to generate
137 * @brief Generate the X25519 algorithm key pair and return it to the caller. The generated key pair is not saved in HKS.
141 * Generate the X25519 algorithm key pair and return it to the caller.
142 The generated key pair is not saved in HKS.
147 key generation, constraint condition: key_param.key_type must be HKS_KEY_TYPE_ECC_KEYPAIR_CURVE25519
151 * @param pri_key [OUT] type #struct hks_blob *,Used to save the generated private key
153 * @param pub_key [OUT] type #struct hks_blob *,Used to save the generated public key.
168 * @brief Associate the ED25519 algorithm public key and the parameters of the public key with the alias and
172 * Associate the ED25519 algorithm public key and the parameters of the public key with the alias and
176 * @param key_alias [IN] type #const struct hks_blob *,Alias to specify to save the ED25519 public key.
178 * @param key_param [IN] type #const struct hks_key_param *,The key parameters associated with
179 the public key are saved to the HKS together with the public key, constraint condition: key_param.key_type must be
183 * @param key [IN] type #const struct hks_blob *,Public key to be imported into hks.
193 const struct hks_key_param *key_param, const struct hks_blob *key);
197 * @brief Export the public key associated with the file name saved in the HKS system.
201 * Export the public key associated with the file name saved in the HKS system.
205 * @param key_alias [IN] type #const struct hks_blob * Alias used to associate with the exported public key,
208 * @param key [OUT] type #struct hks_blob * Cache of hks public key.CNcomment:存放 hks公钥的缓存。CNend
216 const struct hks_blob *key_alias, struct hks_blob *key);
220 * @brief Delete the public key associated with the alias saved in the HKS system.
224 * Delete the public key associated with the alias saved in the HKS system.
228 * @param key_alias [IN] type #const struct hks_blob * The alias associated with the delete key,
241 * @brief Export key attributes associated with aliases stored in the HKS system.
245 * Export key attributes associated with aliases stored in the HKS system.
249 * @param key_alias [IN] type #const struct hks_blob * Alias used to associate with the exported public key,
252 * @param key_param [OUT] type #struct hks_key_param * Pointer to key attribute. CNcomment:存放秘钥属性的指针。CNend
264 * @brief Determine if there is a public or secret key pair associated with the alias in hks.
268 * Determine if there is a public or secret key pair associated with the alias in hks.
272 * @param key_alias [IN] type #const struct hks_blob * The alias associated with the delete key,
305 * @brief Generate a data signature using the ED25519 private key associated with the alias in hks.
309 * Generate a data signature using the ED25519 private key associated with the alias in hks.
313 * @param key_alias [IN] type #const struct hks_blob * Sign using alias of secret key,
316 * @param key_param [IN] type #const struct hks_key_param *,Attributes of the key associated with key_alias.
335 * @brief Verify data signature using ED25519 public key. CNcomment:使用ED25519公钥验证数据签名。CNend
338 * Verify data signature using ED25519 public key. CNcomment:使用ED25519公钥验证数据签名。CNend
341 * @param key [IN] type #const struct hks_blob * The alias or ED25519 public key associated with the ED25519 key.
343 * @param key_param [IN] type #const struct hks_key_param *,The attributes of the key associated with the key.
344 CNcomment:与key关联的秘钥的属性。CNend
355 HKS_DLL_API_PUBLIC int32_t hks_asymmetric_verify(const struct hks_blob *key,
367 * @param key [IN] type #const struct hks_blob *,The key used to encrypt the plaintext.
369 * @param key_param [IN] type #const struct hks_key_param *,The attributes of the key associated with the key.
373 CNcomment:与key关联的秘钥的属性,约束条件:key_param.key_type为HKS_KEY_TYPE_AES,key_param.key_len为128或192或256;
386 HKS_DLL_API_PUBLIC int32_t hks_aead_encrypt(const struct hks_blob *key,
400 * @param key [IN] type #const struct hks_blob *,Secret key for decryption. CNcomment:用于解密的秘钥。CNend
401 * @param key_param [IN] type #const struct hks_key_param *,The attributes of the key associated with the key.
405 CNcomment:与key关联的秘钥的属性,约束条件:key_param.key_type为HKS_KEY_TYPE_AES,key_param.key_len为128或192或256;
418 HKS_DLL_API_PUBLIC int32_t hks_aead_decrypt(const struct hks_blob *key,
432 * @param agreed_key [OUT] type #struct hks_blob *,Negotiation key calculated through X25519.
434 * @param private_key_param [IN] type #const struct hks_key_param *,Local private key private_key attributes.
442 Algorithm for further deriving secret key based on negotiation secret key.
444 * @param private_key [IN] type #const struct hks_blob *,Local X25519 private key。
446 * @param peer_public_key [IN] type #const struct hks_blob *,Peer X25519 public key
464 * Derive the key using HKD512 algorithm based on SHA512.
465 The currently derived key is only used for AES encryption and decryption.
469 * @param derived_key [OUT] type #struct hks_blob *,Derived key calculated through HKDF ,
480 * @param kdf_key [IN] type #const struct hks_blob *,The base key used to derive the key.
508 * @param key [IN] type #const struct hks_blob *,Keys involved in calculating HMAC,
529 HKS_DLL_API_PUBLIC int32_t hks_hmac(const struct hks_blob *key,
590 * @brief Get public key alias list Interface. CNcomment:获取公钥别名列表接口。CNend
593 * Get public key alias list Interface. CNcomment:获取公钥别名列表接口。CNend
599 public key alias number, alloc and free memory by the caller.
612 * @brief generate symmetric key. CNcomment:生成对称密钥。CNend
615 * generate symmetric key,Only AES-128/AES-192/AES-256 key generation is supported.
619 * @param output_key [OUT] type #struct hks_blob *,Key obtained.CNcomment:获取的key。CNend
620 * @param key_param [IN] type #const struct hks_key_param *,Need to generate key parameters.
621 CNcomment:需要生成key的参数。CNend
633 * @brief AES encryption, requires the use of the AES symmetric key generated above as an input parameter,
634 supports GCM CCM CBC mode, key length 128/192/256.
635 CNcomment:AES加密,要求使用上述生成AES对称的密钥作为入参,支持GCM CCM CBC模式,key长度128/192/256。CNend
638 * AES encryption, requires the use of the AES symmetric key generated above as an input parameter,
639 supports GCM CCM CBC mode, key length 128/192/256.
640 CNcomment:AES加密,要求使用上述生成AES对称的密钥作为入参,支持GCM CCM CBC模式,key长度128/192/256。CNend
643 * @param key [IN] type #const struct hks_blob *,The key required for encryption,
644 the key to generate the AES symmetric key output as an input parameter.
645 CNcomment:加密所需密钥,需要为生成AES对称密钥输出的key作为入参。CNend
646 * @param key_param [IN] type #const struct hks_key_param *,Encryption key parameters.
657 HKS_DLL_API_PUBLIC int32_t hks_symmetric_encrypt(const struct hks_blob *key,
663 * @brief AES decryption, requires the use of the above generated AES symmetric key as an input parameter,
664 supports GCM CCM CBC mode, key length 128/192/256.
665 CNcomment:AES解密,要求使用上述生成AES对称的密钥作为入参,支持GCM CCM CBC模式,key长度128/192/256。CNend
668 * AES decryption, requires the use of the above generated AES symmetric key as an input parameter,
669 supports GCM CCM CBC mode, key length 128/192/256.
670 CNcomment:AES解密,要求使用上述生成AES对称的密钥作为入参,支持GCM CCM CBC模式,key长度128/192/256。CNend
673 * @param key [IN] type #const struct hks_blob *,The key required for decryption needs to be the
674 input key for generating the AES symmetric key output.
675 CNcomment:解密所需密钥,需要为生成AES对称密钥输出的key作为入参。CNend
676 * @param key_param [IN] type #const struct hks_key_param *,decrypt key parameters.
687 HKS_DLL_API_PUBLIC int32_t hks_symmetric_decrypt(const struct hks_blob *key,
735 * @brief sign with device key. CNcomment:用设备私钥签名。CNend
738 * sign with device key. CNcomment:用设备私钥签名。CNend