Home
last modified time | relevance | path

Searched refs:cipherText (Results 1 – 25 of 87) sorted by relevance

1234

/base/security/huks/frameworks/huks_standard/main/crypto_engine/mbedtls/src/
Dhks_mbedtls_aes.c99 const struct HksBlob *message, const bool encrypt, struct HksBlob *cipherText) in AesCbcNoPaddingCrypt() argument
129 cipherText->data); in AesCbcNoPaddingCrypt()
132 (void)memset_s(cipherText->data, cipherText->size, 0, cipherText->size); in AesCbcNoPaddingCrypt()
136 cipherText->size = message->size; in AesCbcNoPaddingCrypt()
183 const struct HksBlob *message, const bool encrypt, struct HksBlob *cipherText) in AesCbcNoPaddingCryptUpdate() argument
213 cipherText->data); in AesCbcNoPaddingCryptUpdate()
216 (void)memset_s(cipherText->data, cipherText->size, 0, cipherText->size); in AesCbcNoPaddingCryptUpdate()
221 cipherText->size = message->size; in AesCbcNoPaddingCryptUpdate()
229 const struct HksBlob *message, const bool encrypt, struct HksBlob *cipherText) in AesCbcNoPaddingCryptFinal() argument
260 cipherText->data); in AesCbcNoPaddingCryptFinal()
[all …]
Dhks_mbedtls_engine.c30 const struct HksBlob *message, struct HksBlob *cipherText) in EncryptCheckParam() argument
34 …HKS_IF_NOT_SUCC_LOGE_RETURN(CheckBlob(cipherText), HKS_ERROR_INVALID_ARGUMENT, "Invalid param ciph… in EncryptCheckParam()
263 const struct HksBlob *message, struct HksBlob *cipherText, struct HksBlob *tagAead) in HksCryptoHalEncrypt() argument
265 int32_t ret = EncryptCheckParam(key, usageSpec, message, cipherText); in HksCryptoHalEncrypt()
270 return func(key, usageSpec, message, cipherText, tagAead); in HksCryptoHalEncrypt()
297 …2_t HksCryptoHalEncryptFinal(const struct HksBlob *message, void **ctx, struct HksBlob *cipherText, in HksCryptoHalEncryptFinal() argument
310 return func(ctx, message, cipherText, tagAead, true); in HksCryptoHalEncryptFinal()
325 const struct HksBlob *message, struct HksBlob *cipherText) in HksCryptoHalDecrypt() argument
327 int32_t ret = EncryptCheckParam(key, usageSpec, message, cipherText); in HksCryptoHalDecrypt()
332 return func(key, usageSpec, message, cipherText); in HksCryptoHalDecrypt()
[all …]
Dhks_mbedtls_rsa.c264 const struct HksBlob *message, const bool encrypt, struct HksBlob *cipherText) in HksMbedtlsRsaCrypt() argument
297 &ctrDrbg, (size_t)message->size, message->data, cipherText->data); in HksMbedtlsRsaCrypt()
301 &outlen, message->data, cipherText->data, (size_t)cipherText->size); in HksMbedtlsRsaCrypt()
305 (void)memset_s(cipherText->data, cipherText->size, 0, cipherText->size); in HksMbedtlsRsaCrypt()
309 cipherText->size = (uint32_t)outlen; in HksMbedtlsRsaCrypt()
319 const struct HksBlob *message, struct HksBlob *cipherText, struct HksBlob *tagAead) in HksMbedtlsRsaEncrypt() argument
322 return HksMbedtlsRsaCrypt(key, usageSpec, message, true, cipherText); in HksMbedtlsRsaEncrypt()
326 const struct HksBlob *message, struct HksBlob *cipherText) in HksMbedtlsRsaDecrypt() argument
328 return HksMbedtlsRsaCrypt(key, usageSpec, message, false, cipherText); in HksMbedtlsRsaDecrypt()
/base/security/huks/test/unittest/huks_standard_test/three_stage_test/src/symmetric_alg_test/
Dhks_aes_cipher_test_common.cpp24 …onst struct HksParamSet *encryptParamSet, const struct HksBlob *inData, struct HksBlob *cipherText) in HksAesCipherTestEncrypt() argument
34 ret = TestUpdateLoopFinish(&handleEncrypt, encryptParamSet, inData, cipherText); in HksAesCipherTestEncrypt()
39 …EXPECT_NE(HksMemCmp(inData->data, cipherText->data, inData->size), HKS_SUCCESS) << "cipherText equ… in HksAesCipherTestEncrypt()
48 …EXPECT_EQ(HksMemCmp(outData.data, cipherText->data, outData.size), HKS_SUCCESS) << "cipherText not… in HksAesCipherTestEncrypt()
54 …const struct HksParamSet *decryptParamSet, const struct HksBlob *cipherText, struct HksBlob *plain… in HksAesCipherTestDecrypt() argument
65 ret = TestUpdateLoopFinish(&handleDecrypt, decryptParamSet, cipherText, plainText); in HksAesCipherTestDecrypt()
74 ret = HksDecrypt(keyAlias, decryptParamSet, cipherText, &outData); in HksAesCipherTestDecrypt()
130 struct HksBlob cipherText = { AES_COMMON_SIZE, cipher }; in HksAesCipherTestCaseOther() local
131 ret = HksAesCipherTestEncrypt(keyAlias, encryptParamSet, &inData, &cipherText); in HksAesCipherTestCaseOther()
137 ret = HksAesCipherTestDecrypt(keyAlias, decryptParamSet, &cipherText, &plainText, &inData); in HksAesCipherTestCaseOther()
[all …]
/base/security/crypto_framework/test/unittest/src/
Dcrypto_sm4_cipher_test.cpp97 uint8_t *cipherText, int *cipherTextLen) in Sm4EncryptWithInput() argument
114 if (memcpy_s(cipherText, maxLen, output.data, output.len) != EOK) { in Sm4EncryptWithInput()
127 …if (memcpy_s(cipherText + *cipherTextLen, maxLen - *cipherTextLen, output.data, output.len) != EOK… in Sm4EncryptWithInput()
140 uint8_t *cipherText, int cipherTextLen) in Sm4DecryptEmptyMsg() argument
142 HcfBlob input = { .data = cipherText, .len = cipherTextLen }; in Sm4DecryptEmptyMsg()
166 uint8_t *cipherText, int *cipherTextLen) in Sm4Encrypt() argument
185 if (memcpy_s(cipherText, maxLen, output.data, output.len) != EOK) { in Sm4Encrypt()
198 …if (memcpy_s(cipherText + *cipherTextLen, maxLen - *cipherTextLen, output.data, output.len) != EOK… in Sm4Encrypt()
209 uint8_t *cipherText, int cipherTextLen) in Sm4Decrypt() argument
212 HcfBlob input = {.data = (uint8_t *)cipherText, .len = cipherTextLen}; in Sm4Decrypt()
[all …]
Dcrypto_3des_cipher_test.cpp74 uint8_t *cipherText, int *cipherTextLen) in DesEncrypt() argument
93 if (memcpy_s(cipherText, maxLen, output.data, output.len) != EOK) { in DesEncrypt()
106 …if (memcpy_s(cipherText + *cipherTextLen, maxLen - *cipherTextLen, output.data, output.len) != EOK… in DesEncrypt()
117 uint8_t *cipherText, int cipherTextLen) in DesDecrypt() argument
120 HcfBlob input = {.data = (uint8_t *)cipherText, .len = cipherTextLen}; in DesDecrypt()
136 if (memcpy_s(cipherText, maxLen, output.data, output.len) != EOK) { in DesDecrypt()
149 …if (memcpy_s(cipherText + cipherTextLen, maxLen - cipherTextLen, output.data, output.len) != EOK) { in DesDecrypt()
160 return memcmp(cipherText, plainText, cipherTextLen); in DesDecrypt()
164 uint8_t *cipherText, int *cipherTextLen) in DesNoUpdateEncrypt() argument
183 if (memcpy_s(cipherText, maxLen, output.data, output.len) != EOK) { in DesNoUpdateEncrypt()
[all …]
Dcrypto_aes_cipher_test.cpp294 uint8_t *cipherText, int *cipherTextLen) in AesEncryptWithInput() argument
311 if (memcpy_s(cipherText, maxLen, output.data, output.len) != EOK) { in AesEncryptWithInput()
324 …if (memcpy_s(cipherText + *cipherTextLen, maxLen - *cipherTextLen, output.data, output.len) != EOK… in AesEncryptWithInput()
332 PrintfHex("ciphertext", cipherText, *cipherTextLen); in AesEncryptWithInput()
337 uint8_t *cipherText, int *cipherTextLen) in AesEncrypt() argument
356 if (memcpy_s(cipherText, maxLen, output.data, output.len) != EOK) { in AesEncrypt()
369 …if (memcpy_s(cipherText + *cipherTextLen, maxLen - *cipherTextLen, output.data, output.len) != EOK… in AesEncrypt()
377 PrintfHex("ciphertext", cipherText, *cipherTextLen); in AesEncrypt()
382 uint8_t *cipherText, int cipherTextLen) in AesDecrypt() argument
385 HcfBlob input = {.data = (uint8_t *)cipherText, .len = cipherTextLen}; in AesDecrypt()
[all …]
/base/security/huks/test/unittest/huks_standard_test/three_stage_test/src/asymmetric_alg_test/
Dhks_rsa_cipher_test_common.cpp21 …onst struct HksParamSet *encryptParamSet, const struct HksBlob *inData, struct HksBlob *cipherText) in HksRsaCipherTestEncryptAbnormal() argument
31 …t = TestUpdateFinish(&handleEncrypt, encryptParamSet, HKS_KEY_PURPOSE_ENCRYPT, inData, cipherText); in HksRsaCipherTestEncryptAbnormal()
38 …EXPECT_NE(HksMemCmp(inData->data, cipherText->data, inData->size), HKS_SUCCESS) << "cipherText equ… in HksRsaCipherTestEncryptAbnormal()
47 …EXPECT_EQ(HksMemCmp(outData.data, cipherText->data, outData.size), HKS_SUCCESS) << "cipherText not… in HksRsaCipherTestEncryptAbnormal()
53 …onst struct HksParamSet *encryptParamSet, const struct HksBlob *inData, struct HksBlob *cipherText) in HksRsaCipherTestEncrypt() argument
63 …t = TestUpdateFinish(&handleEncrypt, encryptParamSet, HKS_KEY_PURPOSE_ENCRYPT, inData, cipherText); in HksRsaCipherTestEncrypt()
68 …EXPECT_NE(HksMemCmp(inData->data, cipherText->data, inData->size), HKS_SUCCESS) << "cipherText equ… in HksRsaCipherTestEncrypt()
82 …const struct HksParamSet *decryptParamSet, const struct HksBlob *cipherText, struct HksBlob *plain… in HksRsaCipherTestDecrypt() argument
93 …ret = TestUpdateFinish(&handleDecrypt, decryptParamSet, HKS_KEY_PURPOSE_DECRYPT, cipherText, plain… in HksRsaCipherTestDecrypt()
102 ret = HksDecrypt(keyAlias, decryptParamSet, cipherText, &outData); in HksRsaCipherTestDecrypt()
[all …]
/base/security/huks/test/unittest/huks_standard_test/three_stage_test/src/
Dhks_sm4_cipher_test_common.cpp24 …onst struct HksParamSet *encryptParamSet, const struct HksBlob *inData, struct HksBlob *cipherText) in HksSm4CipherTestEncrypt() argument
34 ret = TestUpdateLoopFinish(&handleEncrypt, encryptParamSet, inData, cipherText); in HksSm4CipherTestEncrypt()
39 …EXPECT_NE(HksMemCmp(inData->data, cipherText->data, inData->size), HKS_SUCCESS) << "cipherText equ… in HksSm4CipherTestEncrypt()
45 …const struct HksParamSet *decryptParamSet, const struct HksBlob *cipherText, struct HksBlob *plain… in HksSm4CipherTestDecrypt() argument
56 ret = TestUpdateLoopFinish(&handleDecrypt, decryptParamSet, cipherText, plainText); in HksSm4CipherTestDecrypt()
90 struct HksBlob cipherText = { SM4_COMMON_SIZE, cipher }; in HksSm4CipherTestCaseOther() local
91 ret = HksSm4CipherTestEncrypt(keyAlias, encryptParamSet, &inData, &cipherText); in HksSm4CipherTestCaseOther()
97 ret = HksSm4CipherTestDecrypt(keyAlias, decryptParamSet, &cipherText, &plainText, &inData); in HksSm4CipherTestCaseOther()
/base/security/huks/frameworks/huks_standard/main/crypto_engine/mbedtls/include/
Dhks_mbedtls_aes.h38 const struct HksBlob *message, struct HksBlob *cipherText, struct HksBlob *tagAead);
41 const struct HksBlob *message, struct HksBlob *cipherText);
46 …sMbedtlsAesCryptoUpdate(void *cryptoCtx, const struct HksBlob *message, struct HksBlob *cipherText,
49 …sMbedtlsAesCryptoFinal(void **cryptoCtx, const struct HksBlob *message, struct HksBlob *cipherText,
Dhks_mbedtls_rsa.h38 const struct HksBlob *message, struct HksBlob *cipherText, struct HksBlob *tagAead);
41 const struct HksBlob *message, struct HksBlob *cipherText);
/base/security/huks/frameworks/huks_standard/main/crypto_engine/openssl/include/
Dhks_openssl_sm4.h35 …pensslSm4EncryptUpdate(void *cryptoCtx, const struct HksBlob *message, struct HksBlob *cipherText);
37 …OpensslSm4EncryptFinal(void **cryptoCtx, const struct HksBlob *message, struct HksBlob *cipherText,
44 …OpensslSm4DecryptFinal(void **cryptoCtx, const struct HksBlob *message, struct HksBlob *cipherText,
49 const struct HksBlob *message, struct HksBlob *cipherText);
Dhks_openssl_aes.h40 …pensslAesEncryptUpdate(void *cryptoCtx, const struct HksBlob *message, struct HksBlob *cipherText);
42 …OpensslAesEncryptFinal(void **cryptoCtx, const struct HksBlob *message, struct HksBlob *cipherText,
49 …OpensslAesDecryptFinal(void **cryptoCtx, const struct HksBlob *message, struct HksBlob *cipherText,
55 const struct HksBlob *message, struct HksBlob *cipherText, struct HksBlob *tagAead);
91 void *cryptoCtx, const struct HksBlob *message, struct HksBlob *cipherText);
94 void **cryptoCtx, const struct HksBlob *message, struct HksBlob *cipherText);
/base/security/huks/test/unittest/huks_standard_test/crypto_engine_test/src/
Dhks_crypto_hal_api_mbedtls.cpp133 HksBlob cipherText = { .size = 0, .data = nullptr }; variable
137 ret = HksCryptoHalEncrypt(&key, nullptr, &message, &cipherText, &tagAead);
141 ret = HksCryptoHalEncrypt(&key, nullptr, &message, &cipherText, &tagAead);
145 ret = HksCryptoHalEncrypt(&key, nullptr, &message, &cipherText, &tagAead);
148 cipherText = { .size = 1, .data = buff };
149 ret = HksCryptoHalEncrypt(&key, nullptr, &message, &cipherText, &tagAead);
152 ret = HksCryptoHalEncrypt(&key, &spec, &message, &cipherText, &tagAead);
168 HksBlob cipherText = { .size = 0, .data = nullptr }; variable
171 ret = HksCryptoHalDecrypt(&key, nullptr, &message, &cipherText);
175 ret = HksCryptoHalDecrypt(&key, nullptr, &message, &cipherText);
[all …]
Dhks_crypto_hal_api_openssl.cpp153 HksBlob cipherText = { .size = 0, .data = nullptr }; variable
157 ret = HksCryptoHalEncrypt(&key, nullptr, &message, &cipherText, &tagAead);
161 ret = HksCryptoHalEncrypt(&key, nullptr, &message, &cipherText, &tagAead);
165 ret = HksCryptoHalEncrypt(&key, nullptr, &message, &cipherText, &tagAead);
168 cipherText = { .size = 1, .data = buff };
169 ret = HksCryptoHalEncrypt(&key, nullptr, &message, &cipherText, &tagAead);
172 ret = HksCryptoHalEncrypt(&key, &spec, &message, &cipherText, &tagAead);
188 HksBlob cipherText = { .size = 0, .data = nullptr }; variable
191 ret = HksCryptoHalDecrypt(&key, nullptr, &message, &cipherText);
195 ret = HksCryptoHalDecrypt(&key, nullptr, &message, &cipherText);
[all …]
/base/security/crypto_framework/test/fuzztest/crypto_operation/hcfciphercreate_fuzzer/
Dhcfciphercreate_fuzzer.cpp34 uint8_t *cipherText, int *cipherTextLen) in AesEncrypt() argument
51 (void)memcpy_s(cipherText, maxLen, output.data, output.len); in AesEncrypt()
62 … (void)memcpy_s(cipherText + *cipherTextLen, maxLen - *cipherTextLen, output.data, output.len); in AesEncrypt()
73 uint8_t *cipherText, int cipherTextLen) in AesDecrypt() argument
76 HcfBlob input = {.data = cipherText, .len = cipherTextLen}; in AesDecrypt()
89 (void)memcpy_s(cipherText, maxLen, output.data, output.len); in AesDecrypt()
102 … (void)memcpy_s(cipherText + cipherTextLen, maxLen - cipherTextLen, output.data, output.len); in AesDecrypt()
110 ret = memcmp(cipherText, plainText, cipherTextLen); in AesDecrypt()
118 uint8_t cipherText[128] = {0}; in TestAesCipher() local
139 (void)AesEncrypt(cipher, key, nullptr, cipherText, &cipherTextLen); in TestAesCipher()
[all …]
/base/security/dlp_permission_service/interfaces/inner_api/dlp_parse/test/
Ddlp_crypt_test.cpp113 struct DlpBlob cipherText = {15, enc}; variable
116 int32_t ret = DlpOpensslAesEncrypt(nullptr, &usageSpec, &message, &cipherText);
134 struct DlpBlob cipherText = {15, enc}; variable
137 int32_t ret = DlpOpensslAesEncrypt(&key, nullptr, &message, &cipherText);
155 struct DlpBlob cipherText = {15, enc}; variable
158 int32_t ret = DlpOpensslAesEncrypt(&key, &usageSpec, nullptr, &cipherText);
382 struct DlpBlob cipherText = {32, g_key}; variable
385 int32_t ret = DlpOpensslAesEncryptUpdate(nullptr, &message, &cipherText);
403 struct DlpBlob cipherText = {15, enc}; variable
410 ret = DlpOpensslAesEncryptUpdate(ctx, nullptr, &cipherText);
[all …]
/base/security/huks/test/unittest/huks_lite_test/common/
Dhks_test_api_performance.c42 const struct HksBlob *plainText, struct HksBlob *cipherText, uint32_t performTimes) in HksEncryptRun() argument
45 if (cipherText != NULL) { in HksEncryptRun()
46 oriCipherTestSize = cipherText->size; in HksEncryptRun()
50 if (cipherText != NULL) { in HksEncryptRun()
51 (void)memset_s(cipherText->data, oriCipherTestSize, 0, oriCipherTestSize); in HksEncryptRun()
52 cipherText->size = oriCipherTestSize; in HksEncryptRun()
55 int32_t ret = HksEncrypt(key, paramSet, plainText, cipherText); in HksEncryptRun()
64 const struct HksBlob *cipherText, struct HksBlob *plainText, uint32_t performTimes) in HksDecryptRun() argument
76 int32_t ret = HksDecrypt(key, paramSet, cipherText, plainText); in HksDecryptRun()
/base/security/huks/test/unittest/huks_standard_test/interface_inner_test/sdk_test/src/
Dhks_test_api_performance.c42 const struct HksBlob *plainText, struct HksBlob *cipherText, uint32_t performTimes) in HksEncryptRun() argument
46 if (cipherText != NULL) { in HksEncryptRun()
47 oriCipherTestSize = cipherText->size; in HksEncryptRun()
51 if (cipherText != NULL) { in HksEncryptRun()
52 (void)memset_s(cipherText->data, oriCipherTestSize, 0, oriCipherTestSize); in HksEncryptRun()
53 cipherText->size = oriCipherTestSize; in HksEncryptRun()
56 ret = HksEncrypt(key, paramSet, plainText, cipherText); in HksEncryptRun()
65 const struct HksBlob *cipherText, struct HksBlob *plainText, uint32_t performTimes) in HksDecryptRun() argument
78 ret = HksDecrypt(key, paramSet, cipherText, plainText); in HksDecryptRun()
/base/security/huks/frameworks/huks_standard/main/crypto_engine/openssl/src/
Dhks_openssl_aes.c140 void *cryptoCtx, const struct HksBlob *message, struct HksBlob *cipherText) in OpensslBlockCipherEncryptUpdate() argument
148 …if (EVP_EncryptUpdate(ctx, cipherText->data, &outLen, message->data, message->size) != HKS_OPENSSL… in OpensslBlockCipherEncryptUpdate()
152 cipherText->size = (uint32_t)outLen; in OpensslBlockCipherEncryptUpdate()
202 void **cryptoCtx, const struct HksBlob *message, struct HksBlob *cipherText) in OpensslBlockCipherEncryptFinalThree() argument
204 return OpensslBlockCipherHandleFinalThree(cryptoCtx, message, cipherText, true); in OpensslBlockCipherEncryptFinalThree()
373 const struct HksBlob *message, struct HksBlob *cipherText, struct HksBlob *tagAead) in OpensslAesAeadEncryptFinal() argument
384 …if (EVP_EncryptUpdate(ctx, cipherText->data, &outLen, message->data, message->size) != HKS_OPENSSL… in OpensslAesAeadEncryptFinal()
389 cipherText->size = (uint32_t)outLen; in OpensslAesAeadEncryptFinal()
391 if (EVP_EncryptFinal_ex(ctx, cipherText->data, &outLen) != HKS_OPENSSL_SUCCESS) { in OpensslAesAeadEncryptFinal()
530 struct HksBlob *cipherText) in OpensslAesAeadEnryptUpdate() argument
[all …]
Dhks_openssl_sm4.c114 …OpensslSm4EncryptUpdate(void *cryptoCtx, const struct HksBlob *message, struct HksBlob *cipherText) in HksOpensslSm4EncryptUpdate() argument
129 ret = OpensslBlockCipherEncryptUpdate(cryptoCtx, message, cipherText); in HksOpensslSm4EncryptUpdate()
142 …OpensslSm4EncryptFinal(void **cryptoCtx, const struct HksBlob *message, struct HksBlob *cipherText, in HksOpensslSm4EncryptFinal() argument
157 ret = OpensslBlockCipherEncryptFinalThree(cryptoCtx, message, cipherText); in HksOpensslSm4EncryptFinal()
212 …OpensslSm4DecryptFinal(void **cryptoCtx, const struct HksBlob *message, struct HksBlob *cipherText, in HksOpensslSm4DecryptFinal() argument
226 ret = OpensslBlockCipherDecryptFinalThree(cryptoCtx, message, cipherText); in HksOpensslSm4DecryptFinal()
269 const struct HksBlob *message, struct HksBlob *cipherText) in HksOpensslSm4Encrypt() argument
272 struct HksBlob tmpCipherText = *cipherText; in HksOpensslSm4Encrypt()
292 cipherText->size = tmpCipherText.size; in HksOpensslSm4Encrypt()
/base/security/dlp_permission_service/interfaces/inner_api/dlp_parse/src/
Ddlp_crypt.cpp169 EVP_CIPHER_CTX* ctx, const struct DlpBlob* message, struct DlpBlob* cipherText) in OpensslAesCipherEncryptFinal() argument
173 …if (EVP_EncryptUpdate(ctx, cipherText->data, &outLen, message->data, message->size) != DLP_OPENSSL… in OpensslAesCipherEncryptFinal()
178 cipherText->size = static_cast<uint32_t>(outLen); in OpensslAesCipherEncryptFinal()
180 if (EVP_EncryptFinal_ex(ctx, cipherText->data + outLen, &outLen) != DLP_OPENSSL_SUCCESS) { in OpensslAesCipherEncryptFinal()
185 cipherText->size += static_cast<uint32_t>(outLen); in OpensslAesCipherEncryptFinal()
266 …lAesCipherEncryptUpdate(void* cryptoCtx, const struct DlpBlob* message, struct DlpBlob* cipherText) in OpensslAesCipherEncryptUpdate() argument
275 …if (EVP_EncryptUpdate(ctx, cipherText->data, &outLen, message->data, message->size) != DLP_OPENSSL… in OpensslAesCipherEncryptUpdate()
279 cipherText->size = static_cast<uint32_t>(outLen); in OpensslAesCipherEncryptUpdate()
285 void** cryptoCtx, const struct DlpBlob* message, struct DlpBlob* cipherText) in OpensslAesCipherEncryptFinalThree() argument
299 if (EVP_EncryptUpdate(ctx, cipherText->data, &outLen, message->data, message->size) != in OpensslAesCipherEncryptFinalThree()
[all …]
/base/security/huks/test/unittest/huks_standard_test/three_stage_test/include/asymmetric_alg_test/
Dhks_rsa_cipher_test_common.h57 const struct HksBlob *inData, struct HksBlob *cipherText);
59 const struct HksBlob *inData, struct HksBlob *cipherText);
61 const struct HksBlob *cipherText, struct HksBlob *plainText, const struct HksBlob *inData);
/base/security/huks/services/huks_standard/huks_service/main/os_dependency/ca/
Dhks_ca_access.c54 const struct HksBlob *plainText, struct HksBlob *cipherText) in HksAccessEncrypt() argument
56 return HksTeeEncrypt(key, paramSet, plainText, cipherText); in HksAccessEncrypt()
60 const struct HksBlob *cipherText, struct HksBlob *plainText) in HksAccessDecrypt() argument
62 return HksTeeDecrypt(key, paramSet, cipherText, plainText); in HksAccessDecrypt()
/base/security/huks/test/unittest/huks_standard_test/interface_inner_test/alg_module_test/src/
Dhks_rsa_common_mt.cpp73 HksBlob cipherText = { .size = inLength, .data = static_cast<uint8_t *>(HksMalloc(inLength)) }; in GenerateKeyTestCase() local
74 ASSERT_NE(cipherText.data, nullptr); in GenerateKeyTestCase()
76 …EXPECT_EQ(EncryptRsa(&plainText, &cipherText, &publicKey, testCaseParams.padding, testCaseParams.k… in GenerateKeyTestCase()
84 …DecryptRsa(&cipherText, &decryptedText, &privateKey, testCaseParams.padding, testCaseParams.keyDig… in GenerateKeyTestCase()
94 HksFree(cipherText.data); in GenerateKeyTestCase()
140 HksBlob cipherText = { .size = inLength, .data = static_cast<uint8_t *>(HksMalloc(inLength)) }; in EncryptLocalTestCase() local
141 ASSERT_NE(cipherText.data, nullptr); in EncryptLocalTestCase()
143 …EXPECT_EQ(HksEncrypt(&publicKey, paramInSet, &plainText, &cipherText), testCaseParams.encryptResul… in EncryptLocalTestCase()
150 …DecryptRsa(&cipherText, &decryptedText, &privateKey, testCaseParams.padding, testCaseParams.keyDig… in EncryptLocalTestCase()
160 HksFree(cipherText.data); in EncryptLocalTestCase()
[all …]

1234