Home
last modified time | relevance | path

Searched refs:kekCipherText (Results 1 – 3 of 3) sorted by relevance

/ohos5.0/base/security/huks/test/unittest/huks_standard_test/three_stage_test/src/
H A Dhks_import_wrapped_test_common.cpp167 struct HksBlob *plainCipherText, struct HksBlob *kekCipherText) in EncryptImportedPlainKeyAndKek() argument
178 … = HksEncryptForDe(params->callerAgreeKeyAlias, encryptParamSet, params->callerKek, kekCipherText); in EncryptImportedPlainKeyAndKek()
184 … struct HksBlob *kekCipherText, struct HksBlob *peerPublicKey, struct HksBlob *wrappedKeyData) in ImportWrappedKey() argument
205 …if (memcpy_s(agreeKeyTagBuf, tagSize, kekCipherText->data + (kekCipherText->size - tagSize), tagSi… in ImportWrappedKey()
208 kekCipherText->size -= tagSize; in ImportWrappedKey()
210 …ruct HksBlob *blobArray[] = { peerPublicKey, &commonAad, &commonNonce, &agreeKeyTag, kekCipherText, in ImportWrappedKey()
244 struct HksBlob kekCipherText = { MAX_KEY_SIZE, kekCipherTextBuffer }; in HksImportWrappedKeyTestCommonCase() local
249 EncryptImportedPlainKeyAndKek(params, &plainCipherText, &kekCipherText); in HksImportWrappedKeyTestCommonCase()
250 … ImportWrappedKey(params, &plainCipherText, &kekCipherText, &callerSelfPublicKey, &wrappedKeyData); in HksImportWrappedKeyTestCommonCase()
/ohos5.0/docs/zh-cn/application-dev/security/UniversalKeystoreKit/
H A Dhuks-import-wrapped-key-ndk.md377 struct OH_Huks_Blob *kekCipherText) {
388 … ret = HuksEncrypt(params->callerAgreeKeyAlias, encryptParamSet, params->callerKek, kekCipherText);
393 … struct OH_Huks_Blob *plainCipher, struct OH_Huks_Blob *kekCipherText,
408 std::copy(kekCipherText->data + (kekCipherText->size - tagSize),
409 kekCipherText->data + (kekCipherText->size - tagSize) + tagSize, agreeKeyTagBuf);
410 kekCipherText->size -= tagSize;
411 …uks_Blob *blobArray[] = {peerPublicKey, &commonAad, &commonNonce, &agreeKeyTag, kekCipherText,
438 struct OH_Huks_Blob kekCipherText = {OH_HUKS_MAX_KEY_SIZE, kekCipherTextBuffer};
469 ret = EncryptImportedPlainKeyAndKek(params, &plainCipherText, &kekCipherText);
474 * 本示例作为变量存放在callerSelfPublicKey,plainCipherText,kekCipherText
[all …]
/ohos5.0/docs/en/application-dev/security/UniversalKeystoreKit/
H A Dhuks-import-wrapped-key-ndk.md377 struct OH_Huks_Blob *kekCipherText) {
388 … ret = HuksEncrypt(params->callerAgreeKeyAlias, encryptParamSet, params->callerKek, kekCipherText);
393 … struct OH_Huks_Blob *plainCipher, struct OH_Huks_Blob *kekCipherText,
405 /* Copy the AEAD tag from kekCipherText and reduce the tag size. */
408 std::copy(kekCipherText->data + (kekCipherText->size - tagSize),
409 kekCipherText->data + (kekCipherText->size - tagSize) + tagSize, agreeKeyTagBuf);
410 kekCipherText->size -= tagSize;
411 …uks_Blob *blobArray[] = {peerPublicKey, &commonAad, &commonNonce, &agreeKeyTag, kekCipherText,
438 struct OH_Huks_Blob kekCipherText = {OH_HUKS_MAX_KEY_SIZE, kekCipherTextBuffer};
469 ret = EncryptImportedPlainKeyAndKek(params, &plainCipherText, &kekCipherText);
[all …]