Home
last modified time | relevance | path

Searched refs:rootKey (Results 1 – 8 of 8) sorted by relevance

/ohos5.0/foundation/communication/dsoftbus/tests/adapter/unittest/
H A Ddsoftbus_aes_crypto_test.cpp54 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 Dsoftbus_aes_encrypt_virtual.c20 …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 Dadaptor_algorithm_test.cpp262 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 Dsoftbus_aes_encrypt.c40 …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()
180rootKey->key == NULL || outData == NULL || (encMode != ENCRYPT_MODE && encMode != DECRYPT_MODE)) { in SoftBusAesCfbRootEncrypt()
[all …]
/ohos5.0/foundation/communication/dsoftbus/adapter/common/include/
H A Dsoftbus_aes_encrypt.h56 …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 Dsoftbusaescrypto_fuzzer.cpp42 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 Dadaptor_algorithm.c300 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 Dadaptor_algorithm.h60 Buffer *Hkdf(const Buffer *salt, const Buffer *rootKey);