/ohos5.0/base/security/huks/services/huks_standard/huks_engine/main/core/src/ |
H A D | hks_auth.c | 69 HKS_LOG_I("tag is 0x%" LOG_PUBLIC "x", authTag); in OptionalParamCheck() 72 int32_t ret = HksGetParam(paramSet, authTag, ¶m); in OptionalParamCheck() 74 HKS_LOG_E("get auth param 0x%" LOG_PUBLIC "x failed!", authTag); in OptionalParamCheck() 82 ret = HksCheckOptionalParam(authTag, alg, purpose, isAbsent, param); in OptionalParamCheck() 110 uint32_t authTag; in AuthPolicy() local 123 authTag = policy->policyTag[i]; in AuthPolicy() 124 ret = HksGetParam(keyBlobParamSet, authTag, &authParam); in AuthPolicy() 126 HKS_LOG_E("get auth param 0x%" LOG_PUBLIC "x failed!", authTag); in AuthPolicy() 136 ret = HksGetParam(paramSet, authTag, &requestParam); in AuthPolicy() 138 HKS_LOG_E("get request param 0x%" LOG_PUBLIC "x failed!", authTag); in AuthPolicy() [all …]
|
/ohos5.0/docs/zh-cn/application-dev/security/CryptoArchitectureKit/ |
H A D | crypto-aes-sym-encrypt-decrypt-ccm.md | 29 6. 读取[CcmParamsSpec.authTag](../../reference/apis-crypto-architecture-kit/js-apis-cryptoFramework.m… 31 在CCM模式下,需要从加密后的数据中取出末尾12字节,作为解密时初始化的认证信息。示例中authTag恰好为12字节。 57 // CCM的authTag在加密时从doFinal结果中获取,在解密时填入init函数的params参数中 61 authTag: tagBlob, 74 ccmParams.authTag = await cipher.doFinal(null); 123 // CCM的authTag在加密时从doFinal结果中获取,在解密时填入init函数的params参数中 127 authTag: tagBlob, 141 ccmParams.authTag = cipher.doFinalSync(null);
|
H A D | crypto-aes-sym-encrypt-decrypt-gcm.md | 29 …/reference/apis-crypto-architecture-kit/js-apis-cryptoFramework.md#gcmparamsspec).authTag作为解密的认证信息。 30 在GCM模式下,需要从加密后的数据中取出末尾16字节,作为解密时初始化的认证信息。示例中authTag恰好为16字节。 65 // GCM的authTag在加密时从doFinal结果中获取,在解密时填入init函数的params参数中 69 authTag: tagBlob, 83 gcmParams.authTag = await cipher.doFinal(null); 143 // GCM的authTag在加密时从doFinal结果中获取,在解密时填入init函数的params参数中 147 authTag: tagBlob, 161 gcmParams.authTag = cipher.doFinalSync(null);
|
H A D | crypto-sm4-sym-encrypt-decrypt-gcm.md | 29 …/reference/apis-crypto-architecture-kit/js-apis-cryptoFramework.md#gcmparamsspec).authTag作为解密的认证信息。 30 在GCM模式下,需要从加密后的数据中取出末尾16字节,作为解密时初始化的认证信息。示例中authTag恰好为16字节。 65 // GCM的authTag在加密时从doFinal结果中获取,在解密时填入init函数的params参数中 69 authTag: tagBlob, 83 gcmParams.authTag = await cipher.doFinal(null); 143 // GCM的authTag在加密时从doFinal结果中获取,在解密时填入init函数的params参数中 147 authTag: tagBlob, 161 gcmParams.authTag = cipher.doFinalSync(null);
|
H A D | crypto-aes-sym-encrypt-decrypt-gcm-by-segment.md | 32 …/reference/apis-crypto-architecture-kit/js-apis-cryptoFramework.md#gcmparamsspec).authTag作为解密的认证信息。 34 在GCM模式下,需要从加密后的数据中取出末尾16字节,作为解密时初始化的认证信息。示例中authTag恰好为16字节。 68 …}; // The GCM authTag is obtained by doFinal() in encryption and passed in params of init() in dec… 72 authTag: tagBlob, 90 // 和填充模式,本例中GCM模式的doFinal结果只包含authTag而不含密文,所以不需要拼接) 96 gcmParams.authTag = await cipher.doFinal(null); 168 …}; // The GCM authTag is obtained by doFinal() in encryption and passed in params of init() in dec… 172 authTag: tagBlob, 190 // 和填充模式,本例中GCM模式的doFinal结果只包含authTag而不含密文,所以不需要拼接) 196 gcmParams.authTag = cipher.doFinalSync(null);
|
H A D | crypto-sm4-sym-encrypt-decrypt-gcm-by-segment.md | 32 …/reference/apis-crypto-architecture-kit/js-apis-cryptoFramework.md#gcmparamsspec).authTag作为解密的认证信息。 34 在GCM模式下,需要从加密后的数据中取出末尾16字节,作为解密时初始化的认证信息。示例中authTag恰好为16字节。 68 …}; // The GCM authTag is obtained by doFinal() in encryption and passed in params of init() in dec… 72 authTag: tagBlob, 90 // 和填充模式,本例中GCM模式的doFinal结果只包含authTag而不含密文,所以不需要拼接) 96 gcmParams.authTag = await cipher.doFinal(null); 168 …}; // The GCM authTag is obtained by doFinal() in encryption and passed in params of init() in dec… 172 authTag: tagBlob, 190 // 和填充模式,本例中GCM模式的doFinal结果只包含authTag而不含密文,所以不需要拼接) 196 gcmParams.authTag = cipher.doFinalSync(null);
|
H A D | crypto-aes-sym-encrypt-decrypt-ccm-ndk.md | 37 …o-architecture-kit/_crypto_sym_cipher_api.md#oh_cryptosymcipherparams_setparam)设置authTag,作为解密的认证信息。 39 在CCM模式下,需要从加密后的数据中取出末尾12字节,作为解密时初始化的认证信息。示例中authTag恰好为12字节。
|
H A D | crypto-aes-sym-encrypt-decrypt-gcm-ndk.md | 38 …o-architecture-kit/_crypto_sym_cipher_api.md#oh_cryptosymcipherparams_setparam)设置authTag,作为解密的认证信息。 39 在GCM模式下,需要从加密后的数据中取出末尾16字节,作为解密时初始化的认证信息。示例中authTag恰好为16字节。
|
H A D | crypto-sm4-sym-encrypt-decrypt-gcm-ndk.md | 36 …pi.md#oh_cryptosymcipherparams_setparam)设置authTag,作为解密的认证信息。在GCM模式下,需要从加密后的数据中取出末尾16字节,作为解密时初始化的认证…
|
H A D | crypto-aes-sym-encrypt-decrypt-gcm-by-segment-ndk.md | 41 …to-architecture-kit/_crypto_sym_cipher_api.md#oh_cryptosymcipherparams_setparam)设置authTag作为解密的认证信息。 43 在GCM模式下,需要从加密后的数据中取出末尾16字节,作为解密时初始化的认证信息。示例中authTag恰好为16字节。
|
H A D | crypto-sm4-sym-encrypt-decrypt-gcm-by-segment-ndk.md | 39 …o-architecture-kit/_crypto_sym_cipher_api.md#oh_cryptosymcipherparams_setparam)设置authTag,作为解密的认证信息。 40 在GCM模式下,需要从加密后的数据中取出末尾16字节,作为解密时初始化的认证信息。示例中authTag恰好为16字节。
|
/ohos5.0/docs/en/application-dev/security/CryptoArchitectureKit/ |
H A D | crypto-aes-sym-encrypt-decrypt-ccm.md | 29 6. Obtain [CcmParamsSpec.authTag](../../reference/apis-crypto-architecture-kit/js-apis-cryptoFramew… 31 …for initializing the **Cipher** instance in decryption. In the example, **authTag** is of 12 bytes. 57 …// Obtain the CCM authTag from the Cipher.doFinal result in encryption and fill it in the params p… 61 authTag: tagBlob, 74 ccmParams.authTag = await cipher.doFinal(null); 123 …// Obtain the CCM authTag from the Cipher.doFinal result in encryption and fill it in the params p… 127 authTag: tagBlob, 141 ccmParams.authTag = cipher.doFinalSync(null);
|
H A D | crypto-sm4-sym-encrypt-decrypt-gcm.md | 29 …e/apis-crypto-architecture-kit/js-apis-cryptoFramework.md#gcmparamsspec).authTag as the authentica… 30 …for initializing the **Cipher** instance in decryption. In the example, **authTag** is of 16 bytes. 65 …// Obtain the GCM authTag from the Cipher.doFinal result in encryption and fill it in the params p… 69 authTag: tagBlob, 83 gcmParams.authTag = await cipher.doFinal(null); 143 …// Obtain the GCM authTag from the Cipher.doFinal result in encryption and fill it in the params p… 147 authTag: tagBlob, 161 gcmParams.authTag = cipher.doFinalSync(null);
|
H A D | crypto-aes-sym-encrypt-decrypt-gcm.md | 29 …e/apis-crypto-architecture-kit/js-apis-cryptoFramework.md#gcmparamsspec).authTag as the authentica… 30 …for initializing the **Cipher** instance in decryption. In the example, **authTag** is of 16 bytes. 65 …// Obtain the GCM authTag from the Cipher.doFinal result in encryption and fill it in the params p… 69 authTag: tagBlob, 83 gcmParams.authTag = await cipher.doFinal(null); 143 …// Obtain the GCM authTag from the Cipher.doFinal result in encryption and fill it in the params p… 147 authTag: tagBlob, 161 gcmParams.authTag = cipher.doFinalSync(null);
|
H A D | crypto-sm4-sym-encrypt-decrypt-gcm-by-segment.md | 32 …e/apis-crypto-architecture-kit/js-apis-cryptoFramework.md#gcmparamsspec).authTag as the authentica… 34 …for initializing the **Cipher** instance in decryption. In the example, **authTag** is of 16 bytes. 68 …}; // The GCM authTag is obtained by doFinal() in encryption and passed in params of init() in dec… 72 authTag: tagBlob, 90 …In this example, the GCM mode is used, and the doFinal() result contains authTag but not ciphertex… 96 gcmParams.authTag = await cipher.doFinal(null); 168 …}; // The GCM authTag is obtained by doFinal() in encryption and passed in params of init() in dec… 172 authTag: tagBlob, 190 …In this example, the GCM mode is used, and the doFinal() result contains authTag but not ciphertex… 196 gcmParams.authTag = cipher.doFinalSync(null);
|
H A D | crypto-aes-sym-encrypt-decrypt-gcm-by-segment.md | 32 …e/apis-crypto-architecture-kit/js-apis-cryptoFramework.md#gcmparamsspec).authTag as the authentica… 34 …for initializing the **Cipher** instance in decryption. In the example, **authTag** is of 16 bytes. 68 …}; // The GCM authTag is obtained by doFinal() in encryption and passed in params of init() in dec… 72 authTag: tagBlob, 90 …In this example, the GCM mode is used, and the doFinal() result contains authTag but not ciphertex… 96 gcmParams.authTag = await cipher.doFinal(null); 168 …}; // The GCM authTag is obtained by doFinal() in encryption and passed in params of init() in dec… 172 authTag: tagBlob, 190 …In this example, the GCM mode is used, and the doFinal() result contains authTag but not ciphertex… 196 gcmParams.authTag = cipher.doFinalSync(null);
|
H A D | crypto-aes-sym-encrypt-decrypt-ccm-ndk.md | 37 …it/_crypto_sym_cipher_api.md#oh_cryptosymcipherparams_setparam) to set **authTag** as the authenti… 39 …for initializing the **Cipher** instance in decryption. In the example, **authTag** is of 12 bytes.
|
H A D | crypto-sm4-sym-encrypt-decrypt-gcm-ndk.md | 36 …authTag** as the authentication information for decryption. In GCM mode, extract the last 16 bytes…
|
H A D | crypto-aes-sym-encrypt-decrypt-gcm-ndk.md | 38 …it/_crypto_sym_cipher_api.md#oh_cryptosymcipherparams_setparam) to set **authTag** as the authenti… 39 …for initializing the **Cipher** instance in decryption. In the example, **authTag** is of 16 bytes.
|
/ohos5.0/base/security/crypto_framework/frameworks/cj/src/ |
H A D | crypto_ffi.cpp | 427 HcfBlob authTag = {}; in FfiOHOSCipherInitByGcm() local 429 gcmParamsSpec->tag = spec.authTag; in FfiOHOSCipherInitByGcm() 432 if (authTag.data == nullptr) { in FfiOHOSCipherInitByGcm() 436 authTag.len = GCM_AUTH_TAG_LEN; in FfiOHOSCipherInitByGcm() 437 gcmParamsSpec->tag = authTag; in FfiOHOSCipherInitByGcm() 445 HcfBlobDataFree(&authTag); in FfiOHOSCipherInitByGcm() 470 HcfBlob authTag = {}; in FfiOHOSCipherInitByCcm() local 476 if (authTag.data == nullptr) { in FfiOHOSCipherInitByCcm() 480 authTag.len = CCM_AUTH_TAG_LEN; in FfiOHOSCipherInitByCcm() 481 ccmParamsSpec->tag = authTag; in FfiOHOSCipherInitByCcm() [all …]
|
/ohos5.0/docs/zh-cn/release-notes/changelogs/OpenHarmony_4.0.3.2/ |
H A D | changelog-security.md | 56 let gcmParamsSpec = {iv : ivBlob, aad : aadBlob, authTag : tagBlob, algName : "GcmParamsSpec"};
|
/ohos5.0/base/security/crypto_framework/frameworks/js/napi/crypto/src/ |
H A D | napi_utils.cpp | 409 HcfBlob authTag = {}; in GetGcmParamsSpec() local 431 authTag.data = static_cast<uint8_t *>(HcfMalloc(GCM_AUTH_TAG_LEN, 0)); in GetGcmParamsSpec() 432 if (authTag.data == nullptr) { in GetGcmParamsSpec() 436 authTag.len = GCM_AUTH_TAG_LEN; in GetGcmParamsSpec() 444 gcmParamsSpec->tag = opMode == DECRYPT_MODE ? *tag : authTag; in GetGcmParamsSpec() 465 HcfBlob authTag = {}; in GetCcmParamsSpec() local 486 authTag.data = static_cast<uint8_t *>(HcfMalloc(CCM_AUTH_TAG_LEN, 0)); in GetCcmParamsSpec() 487 if (authTag.data == nullptr) { in GetCcmParamsSpec() 491 authTag.len = CCM_AUTH_TAG_LEN; in GetCcmParamsSpec() 498 ccmParamsSpec->tag = opMode == DECRYPT_MODE ? *tag : authTag; in GetCcmParamsSpec()
|
/ohos5.0/docs/zh-cn/application-dev/reference/apis-crypto-architecture-kit/ |
H A D | _crypto_sym_cipher_api.md | 99 | CRYPTO_TAG_DATABLOB | 加解密参数authTag。 |
|
H A D | js-apis-cryptoFramework.md | 101 …authTag | [DataBlob](#datablob) | 是 | 是 | 指明加解密参数authTag,长度为16字节。<br/>采用GCM模式加密时,需要获取[doFinal(… 125 …authTag | [DataBlob](#datablob) | 是 | 是 | 指明加解密参数authTag,长度为12字节。<br/>采用CCM模式加密时,需要获取[doFinal(… 3129 …Final的结果拼接起来,会得到“密文+authTag”,即末尾的16字节(GCM模式)或12字节(CCM模式)是authTag,而其余部分均为密文。(也就是说,如果doFinal的data参数传… 3191 authTag: tagBlob, 3207 gcmParams.authTag = tag; 3222 …nal的结果拼接起来,会得到“密文+authTag”,即末尾的16字节(GCM模式)或12字节(CCM模式)是authTag,而其余部分均为密文。(也就是说,如果doFinal的data参数传入n… 3289 authTag: tagBlob, 3304 gcmParams.authTag = await cipher.doFinal(null); 3315 …结果拼接起来,会得到“密文+authTag”,即末尾的16字节(GCM模式)或12字节(CCM模式)是authTag,而其余部分均为密文。(也就是说,如果doFinalSync的data参数传入n… 3369 authTag: tagBlob, [all …]
|
/ohos5.0/docs/en/release-notes/changelogs/OpenHarmony_4.0.3.2/ |
H A D | changelog-security.md | 56 let gcmParamsSpec = {iv : ivBlob, aad : aadBlob, authTag : tagBlob, algName : "GcmParamsSpec"};
|