/ohos5.0/foundation/communication/dsoftbus/tests/adapter/unittest/ |
H A D | dsoftbus_aes_crypto_test.cpp | 54 uint8_t rootKey[rootKeyLen]; variable 59 ret = SoftBusGenerateRandomArray(rootKey, rootKeyLen); 79 uint8_t rootKey[rootKeyLen]; variable 84 ret = SoftBusGenerateRandomArray(rootKey, rootKeyLen); 88 ret = SoftBusGenerateHmacHash(nullptr, rootKey, rootKeyLen, hash, hashLen); 110 uint8_t rootKey[rootKeyLen]; variable 115 ret = SoftBusGenerateRandomArray(rootKey, rootKeyLen); 150 EncryptKey rootKey = { rKey, rootKeyLen }; variable 189 EncryptKey rootKey = { rKey, rootKeyLen }; variable 241 EncryptKey rootKey = { rKey, rootKeyLen }; variable [all …]
|
/ohos5.0/foundation/communication/dsoftbus/adapter/common/mbedtls/ |
H A D | softbus_aes_encrypt_virtual.c | 20 …const EncryptKey *randomKey, const uint8_t *rootKey, uint32_t rootKeyLen, uint8_t *hash, uint32_t … in SoftBusGenerateHmacHash() argument 23 (void)rootKey; in SoftBusGenerateHmacHash() 30 …tBusAesCfbRootEncrypt(const AesInputData *inData, const EncryptKey *randomKey, EncryptKey *rootKey, in SoftBusAesCfbRootEncrypt() argument 35 (void)rootKey; in SoftBusAesCfbRootEncrypt()
|
/ohos5.0/drivers/peripheral/pin_auth/test/unittest/pin_auth/adaptor/src/ |
H A D | adaptor_algorithm_test.cpp | 262 Buffer *rootKey = CreateBufferBySize(AES_GCM_256_KEY_SIZE); variable 263 ASSERT_NE(rootKey, nullptr); 264 (void)SecureRandom(rootKey->buf, rootKey->maxSize); 265 rootKey->contentSize = rootKey->maxSize; 266 Buffer *key = Hkdf(salt, rootKey); 270 DestroyBuffer(rootKey);
|
/ohos5.0/foundation/communication/dsoftbus/adapter/common/openssl/ |
H A D | softbus_aes_encrypt.c | 40 …const EncryptKey *randomKey, const uint8_t *rootKey, uint32_t rootKeyLen, uint8_t *hash, uint32_t … in SoftBusGenerateHmacHash() argument 45 …if (randomKey == NULL || rootKey == NULL || rootKeyLen == 0 || hash == NULL || hashLen < SHA256_MA… in SoftBusGenerateHmacHash() 59 if (HMAC_Init_ex(ctx, rootKey, rootKeyLen, EVP_sha256(), NULL) != 1) { in SoftBusGenerateHmacHash() 126 static int32_t RootKeyGenerateIvAndSessionKey(const EncryptKey *randomKey, EncryptKey *rootKey, Aes… in RootKeyGenerateIvAndSessionKey() argument 129 …if (SoftBusGenerateHmacHash(randomKey, rootKey->key, rootKey->len, result, sizeof(result)) != SOFT… in RootKeyGenerateIvAndSessionKey() 148 static int32_t GenerateIvAndSessionKey(const EncryptKey *randomKey, EncryptKey *rootKey, AesCipherK… in GenerateIvAndSessionKey() argument 165 if (RootKeyGenerateIvAndSessionKey(randomKey, rootKey, cipherKey) != SOFTBUS_OK) { in GenerateIvAndSessionKey() 176 …tBusAesCfbRootEncrypt(const AesInputData *inData, const EncryptKey *randomKey, EncryptKey *rootKey, in SoftBusAesCfbRootEncrypt() argument 179 …= NULL || inData->data == NULL || randomKey == NULL || randomKey->key == NULL || rootKey == NULL || in SoftBusAesCfbRootEncrypt() 180 … rootKey->key == NULL || outData == NULL || (encMode != ENCRYPT_MODE && encMode != DECRYPT_MODE)) { in SoftBusAesCfbRootEncrypt() [all …]
|
/ohos5.0/foundation/communication/dsoftbus/adapter/common/include/ |
H A D | softbus_aes_encrypt.h | 56 …const EncryptKey *randomKey, const uint8_t *rootKey, uint32_t rootKeyLen, uint8_t *hash, uint32_t … 59 …tBusAesCfbRootEncrypt(const AesInputData *inData, const EncryptKey *randomKey, EncryptKey *rootKey,
|
/ohos5.0/foundation/communication/dsoftbus/tests/adapter/fuzztest/softbusaescrypto_fuzzer/ |
H A D | softbusaescrypto_fuzzer.cpp | 42 EncryptKey rootKey = { data, size }; in SoftBusAesCfbRootEncryptFuzzTest() local 44 …if (SoftBusAesCfbRootEncrypt(&encryptInData, &randomKey, &rootKey, ENCRYPT_MODE, &encryptOutData) … in SoftBusAesCfbRootEncryptFuzzTest() 49 …(const AesInputData *)&encryptOutData, &randomKey, &rootKey, DECRYPT_MODE, &decryptOutData) != SOF… in SoftBusAesCfbRootEncryptFuzzTest()
|
/ohos5.0/drivers/peripheral/pin_auth/hdi_service/adaptor/src/ |
H A D | adaptor_algorithm.c | 300 Buffer *Hkdf(const Buffer *salt, const Buffer *rootKey) in Hkdf() argument 303 !IsBufferValid(rootKey) || rootKey->contentSize != HKDF_KEY_SIZE) { in Hkdf() 322 EVP_PKEY_CTX_set1_hkdf_key(ctx, rootKey->buf, rootKey->contentSize) != OPENSSL_SUCCESS || in Hkdf()
|
/ohos5.0/drivers/peripheral/pin_auth/hdi_service/adaptor/inc/ |
H A D | adaptor_algorithm.h | 60 Buffer *Hkdf(const Buffer *salt, const Buffer *rootKey);
|