Home
last modified time | relevance | path

Searched refs:rootKey (Results 1 - 5 of 5) sorted by relevance

/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 hashLen) in SoftBusGenerateHmacHash()
23 (void)rootKey; in SoftBusGenerateHmacHash()
30 int32_t SoftBusAesCfbRootEncrypt(const AesInputData *inData, const EncryptKey *randomKey, EncryptKey *rootKey, in SoftBusAesCfbRootEncrypt() argument
35 (void)rootKey; in SoftBusAesCfbRootEncrypt()
19 SoftBusGenerateHmacHash( const EncryptKey *randomKey, const uint8_t *rootKey, uint32_t rootKeyLen, uint8_t *hash, uint32_t hashLen) SoftBusGenerateHmacHash() argument
/foundation/communication/dsoftbus/tests/adapter/unittest/
H A Ddsoftbus_aes_crypto_test.cpp54 uint8_t rootKey[rootKeyLen]; in HWTEST_F() local
59 ret = SoftBusGenerateRandomArray(rootKey, rootKeyLen); in HWTEST_F()
63 ret = SoftBusGenerateHmacHash(&randomKey, rootKey, rootKeyLen, hash, hashLen); in HWTEST_F()
79 uint8_t rootKey[rootKeyLen]; in HWTEST_F() local
84 ret = SoftBusGenerateRandomArray(rootKey, rootKeyLen); in HWTEST_F()
88 ret = SoftBusGenerateHmacHash(nullptr, rootKey, rootKeyLen, hash, hashLen); in HWTEST_F()
92 ret = SoftBusGenerateHmacHash(&randomKey, rootKey, rootKeyLen, nullptr, hashLen); in HWTEST_F()
110 uint8_t rootKey[rootKeyLen]; in HWTEST_F() local
115 ret = SoftBusGenerateRandomArray(rootKey, rootKeyLen); in HWTEST_F()
119 ret = SoftBusGenerateHmacHash(&randomKey, rootKey, rootKeyLen in HWTEST_F()
150 EncryptKey rootKey = { rKey, rootKeyLen }; HWTEST_F() local
189 EncryptKey rootKey = { rKey, rootKeyLen }; HWTEST_F() local
241 EncryptKey rootKey = { rKey, rootKeyLen }; HWTEST_F() local
286 EncryptKey rootKey = { rKey, rootKeyLen }; HWTEST_F() local
[all...]
/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 hashLen);
58 // Aes-cfb encrypt and decrypt by randomKey and rootKey
59 int32_t SoftBusAesCfbRootEncrypt(const AesInputData *inData, const EncryptKey *randomKey, EncryptKey *rootKey,
/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 hashLen) in SoftBusGenerateHmacHash()
45 if (randomKey == NULL || rootKey == NULL || rootKeyLen == 0 || hash == NULL || hashLen < SHA256_MAC_LEN) { 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, AesCipherKey *cipherKey) in RootKeyGenerateIvAndSessionKey() argument
129 if (SoftBusGenerateHmacHash(randomKey, rootKey->key, rootKey->len, result, sizeof(result)) != SOFTBUS_OK) { in RootKeyGenerateIvAndSessionKey()
148 static int32_t GenerateIvAndSessionKey(const EncryptKey *randomKey, EncryptKey *rootKey, AesCipherKey *cipherKey) in GenerateIvAndSessionKey() argument
165 if (RootKeyGenerateIvAndSessionKey(randomKey, rootKey, cipherKey) != SOFTBUS_OK) { in GenerateIvAndSessionKey()
176 int32_t SoftBusAesCfbRootEncrypt(const AesInputData *inData, const EncryptKey *randomKey, EncryptKey *rootKey, in SoftBusAesCfbRootEncrypt() argument
179 if (inData == NULL || inData->data == NULL || randomKey == NULL || randomKey->key == NULL || rootKey in SoftBusAesCfbRootEncrypt()
39 SoftBusGenerateHmacHash( const EncryptKey *randomKey, const uint8_t *rootKey, uint32_t rootKeyLen, uint8_t *hash, uint32_t hashLen) SoftBusGenerateHmacHash() argument
[all...]
/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) != SOFTBUS_OK) { in SoftBusAesCfbRootEncryptFuzzTest()
49 (const AesInputData *)&encryptOutData, &randomKey, &rootKey, DECRYPT_MODE, &decryptOutData) != SOFTBUS_OK) { in SoftBusAesCfbRootEncryptFuzzTest()

Completed in 4 milliseconds