Home
last modified time | relevance | path

Searched refs:nonce (Results 1 - 20 of 20) sorted by relevance

/foundation/filemanagement/storage_service/services/storage_daemon/crypto/test/fscrypt_v2_test/
H A Dfscrypt_key_v2_test.cpp324 KeyBlob nonce(nonceVct); in HWTEST_F()
328 EXPECT_TRUE(g_testKeyV2.CombKeyCtx(nonce, rndEnc, aad, keyOut)); in HWTEST_F()
337 EXPECT_FALSE(g_testKeyV2.CombKeyCtx(nonce, rndEnc, aad, keyOut)); in HWTEST_F()
341 EXPECT_FALSE(g_testKeyV2.CombKeyCtx(nonce, rndEnc, aad, keyOut)); in HWTEST_F()
344 nonce.Clear(); in HWTEST_F()
345 EXPECT_FALSE(g_testKeyV2.CombKeyCtx(nonce, rndEnc, aad, keyOut)); in HWTEST_F()
361 KeyBlob nonce(nonceVct); in HWTEST_F()
365 EXPECT_FALSE(g_testKeyV2.SplitKeyCtx(keyIn, nonce, rndEnc, aad)); in HWTEST_F()
369 EXPECT_TRUE(g_testKeyV2.SplitKeyCtx(keyIn2, nonce, rndEnc, aad)); in HWTEST_F()
410 KeyBlob nonce; in HWTEST_F() local
[all...]
/foundation/filemanagement/storage_service/services/storage_daemon/crypto/src/
H A Dbase_key.cpp77 KeyBlob tempNonce(sourceCtx.nonce); in DoTempStore()
81 targetCtx.nonce = std::move(tempNonce); in DoTempStore()
260 // save key buff nonce+rndEnc+aad in StoreKey()
300 if (!GenerateKeyBlob(keyCtx.nonce, GCM_NONCE_BYTES) || in StoreKey()
302 LOGE("Generate nonce and aad failed !"); in StoreKey()
310 KeyBlob storeKey(keyCtx.nonce.size + keyCtx.rndEnc.size + keyCtx.aad.size); in StoreKey()
311 if (!CombKeyCtx(keyCtx.nonce, keyCtx.rndEnc, keyCtx.aad, storeKey)) { in StoreKey()
637 ctxNone.nonce.Alloc(GCM_NONCE_BYTES); in StoreKey()
638 if (!SplitKeyCtx(ctxNone.rndEnc, ctxNone.nonce, ctxNone.rndEnc, ctxNone.aad)) { in StoreKey()
945 CombKeyBlob(keyCtx.rndEnc, keyCtx.nonce, encryptedKe in StoreKey()
1010 SplitKeyBlob(const KeyBlob &keyIn, KeyBlob &encAad, KeyBlob &nonce, uint32_t start) StoreKey() argument
1051 CombKeyCtx(const KeyBlob &nonce, const KeyBlob &rndEnc, const KeyBlob &aad, KeyBlob &keyOut) StoreKey() argument
1072 SplitKeyCtx(const KeyBlob &keyIn, KeyBlob &nonce, KeyBlob &rndEnc, KeyBlob &aad) StoreKey() argument
[all...]
H A Dhuks_master.cpp457 ctx.nonce = HashWithPrefix("NONCE SHA512 prefix", ctx.secDiscard, CRYPTO_AES_NONCE_LEN); in AppendNonceAad()
460 { .tag = HKS_TAG_NONCE, .blob = { ctx.nonce.size, ctx.nonce.data.get() } }, in AppendNonceAad()
471 { .tag = HKS_TAG_NONCE, .blob = { ctx.nonce.size, ctx.nonce.data.get() } }, in AppendNonceAadTokenEx()
478 { .tag = HKS_TAG_NONCE, .blob = { ctx.nonce.size, ctx.nonce.data.get() } }, in AppendNonceAadTokenEx()
489 ctx.nonce = HuksMaster::GenerateRandomKey(CRYPTO_HKS_NONCE_LEN); in AppendNewNonceAadToken()
490 LOGI("Encrypt generate new nonce size: %{public}d", ctx.nonce in AppendNewNonceAadToken()
[all...]
/foundation/communication/wifi/wifi/test/wifi_utils/unittest/
H A Dwifi_common_util_test.cpp105 std::vector<uint8_t> nonce(str.begin(), str.end()); in HWTEST_F()
106 uint8_t autsLen = nonce.size(); in HWTEST_F()
107 Byte2HexString(&nonce[offset], autsLen, autsBuf, sizeof(autsBuf)); in HWTEST_F()
116 std::vector<uint8_t> nonce(str.begin(), str.end()); in HWTEST_F()
117 uint8_t autsLen = nonce.size(); in HWTEST_F()
137 std::vector<uint8_t> nonce(srcStr.begin(), srcStr.end()); in HWTEST_F()
138 uint8_t autsLen = nonce.size(); in HWTEST_F()
139 Byte2HexString(&nonce[0], autsLen, autsBuf, sizeof(autsBuf)); in HWTEST_F()
/foundation/communication/wifi/wifi/services/wifi_standard/wifi_framework/wifi_toolkit/utils/
H A Dwifi_encryption_util.cpp98 uint8_t nonce[NONCE_SIZE] = {0}; in WifiEncryption() local
99 struct HksBlob randomIV = {NONCE_SIZE, nonce}; in WifiEncryption()
106 { .tag = HKS_TAG_NONCE, .blob = { .size = NONCE_SIZE, .data = nonce } }, in WifiEncryption()
134 encryptedData.IV = ConvertArrayToHex(nonce, NONCE_SIZE); in WifiEncryption()
153 uint8_t nonce[NONCE_SIZE] = {0}; in WifiDecryption() local
155 retStrToArrat = HexStringToVec(encryptedData.IV, nonce, NONCE_SIZE, lengthIV); in WifiDecryption()
160 { .tag = HKS_TAG_NONCE, .blob = { .size = NONCE_SIZE, .data = nonce } }, in WifiDecryption()
319 uint8_t nonce[AES_256_NONCE_SIZE] = { 0 }; in EncryptParamSet() local
321 if (HexStringToVec(encryptedData.IV, nonce, AES_256_NONCE_SIZE, nonceLength) != 0) { in EncryptParamSet()
325 struct HksBlob encryptNonce = { nonceLength, nonce }; in EncryptParamSet()
348 uint8_t nonce[AES_256_NONCE_SIZE] = { 0 }; DecryptParamSet() local
[all...]
/foundation/communication/bluetooth_service/services/bluetooth/service/src/obex/
H A Dobex_utils.cpp240 std::string nonce = timeStamp + ":" + priKey; in MakeNonce() local
244 return digest->Digest((uint8_t *)nonce.data(), nonce.size()); in MakeNonce()
247 std::vector<uint8_t> ObexUtils::MakeRequestDigest(const uint8_t *nonce, int sz, const std::string &password) in MakeRequestDigest() argument
252 (void)memcpy_s(nonceBuf, sizeof(nonceBuf), nonce, sz); in MakeRequestDigest()
H A Dobex_utils.h43 static std::vector<uint8_t> MakeRequestDigest(const uint8_t *nonce, int sz, const std::string &password);
H A Dobex_headers.cpp1286 void ObexDigestChallenge::AppendNonce(const uint8_t *nonce, const uint8_t length) in AppendNonce() argument
1288 tlvTriplets_.push_back(std::make_unique<TlvTriplet>(ObexDigestChallenge::NONCE, length, nonce)); in AppendNonce()
1332 void ObexDigestResponse::AppendNonce(const uint8_t *nonce, const uint8_t length) in AppendNonce() argument
1334 tlvTriplets_.push_back(std::make_unique<TlvTriplet>(ObexDigestResponse::NONCE, length, nonce)); in AppendNonce()
1379 void ObexSessionParameters::AppendNonce(const uint8_t *nonce, const uint8_t length) in AppendNonce() argument
1381 tlvTriplets_.push_back(std::make_unique<TlvTriplet>(ObexSessionParameters::NONCE, length, nonce)); in AppendNonce()
H A Dobex_headers.h117 // String of bytes representing the nonce. Value Len 16
131 void AppendNonce(const uint8_t *nonce, const uint8_t length);
141 // The nonce sent in the digest challenge string. Value Len 16
149 void AppendNonce(const uint8_t *nonce, const uint8_t length);
164 // The nonce is a value provided by the device, which will be used in the
166 // created by the device. One method for creating the nonce is to start with a
172 // address and nonce from the client and server and running the MD5 algorithm
208 void AppendNonce(const uint8_t *nonce, const uint8_t length);
/foundation/CastEngine/castengine_wifi_display/services/protocol/rtsp/src/
H A Drtsp_common.cpp155 const std::string &password, const std::string &nonce, in GenerateAuthorization()
160 auto responseMD5 = GetMD5(urpMD5 + ':' + nonce + ':' + pmuMD5); in GenerateAuthorization()
161 auto authorization = "Digest username=\"" + username + "\", realm=\"" + realm + "\", nonce=\"" + nonce + in GenerateAuthorization()
154 GenerateAuthorization(const std::string &username, const std::string &realm, const std::string &password, const std::string &nonce, const std::string &method, const std::string &url) GenerateAuthorization() argument
/foundation/filemanagement/storage_service/services/storage_daemon/include/crypto/
H A Dbase_key.h112 bool CombKeyCtx(const KeyBlob &nonce, const KeyBlob &rndEnc, const KeyBlob &aad, KeyBlob &keyOut);
113 bool SplitKeyCtx(const KeyBlob &keyIn, KeyBlob &nonce, KeyBlob &rndEnc, KeyBlob &aad);
115 void SplitKeyBlob(const KeyBlob &keyIn, KeyBlob &encAad, KeyBlob &nonce, uint32_t start);
H A Dkey_blob.h161 KeyBlob nonce; member
/foundation/communication/wifi/wifi/services/wifi_standard/wifi_framework/wifi_manage/wifi_sta/
H A Dsta_state_machine.cpp2250 std::string StaStateMachine::SimAkaAuth(const std::string &nonce, AuthType authType) in SimAkaAuth() argument
2252 LOGD("StaStateMachine::SimAkaAuth in, authType:%{public}d, nonce:%{private}s", authType, nonce.c_str()); in SimAkaAuth()
2257 int32_t result = CoreServiceClient::GetInstance().SimAuthentication(slotId, authType, nonce, response); in SimAkaAuth()
2313 std::vector<uint8_t> nonce; in GetGsmAuthResponseWithLength() local
2314 if (!DecodeBase64(response, nonce)) { in GetGsmAuthResponseWithLength()
2315 LOGE("%{public}s: failed to decode sim authentication, size:%{public}zu", __func__, nonce.size()); in GetGsmAuthResponseWithLength()
2320 uint8_t sresLen = nonce[0]; in GetGsmAuthResponseWithLength()
2321 if (sresLen >= nonce.size()) { in GetGsmAuthResponseWithLength()
2323 __func__, sresLen, nonce in GetGsmAuthResponseWithLength()
2409 std::vector<uint8_t> nonce; GetGsmAuthResponseWithoutLength() local
2512 ParseAndFillUmtsAuthParam(std::vector<uint8_t> &nonce) ParseAndFillUmtsAuthParam() argument
2648 std::vector<uint8_t> nonce; DealWpaEapUmtsAuthEvent() local
[all...]
H A Dsta_state_machine.h1106 * @param nonce - sim id
1109 std::string SimAkaAuth(const std::string &nonce, AuthType authType);
1148 * @param nonce: authentication data
1150 std::string ParseAndFillUmtsAuthParam(std::vector<uint8_t> &nonce);
/foundation/CastEngine/castengine_wifi_display/services/protocol/rtsp/include/
H A Drtsp_common.h97 const std::string &password, const std::string &nonce,
/foundation/communication/netmanager_base/services/netmanagernative/include/netsys/
H A Dclat_utils.h47 uint8_t nonce[6]; member
/foundation/filemanagement/storage_service/services/storage_daemon/mock/
H A Dbase_key_mock.cpp125 keyContext_.nonce.Clear(); in ClearMemoryKeyCtx()
/foundation/communication/netmanager_base/services/netmanagernative/src/netsys/
H A Dclatd.cpp114 arc4random_buf(&dadPacket.nonce, sizeof(dadPacket.nonce)); in SendDadPacket()
/foundation/communication/wifi/wifi/test/wifi_standard/wifi_framework/wifi_manage/wifi_sta/
H A Dsta_state_machine_test.cpp1978 std::vector<uint8_t> nonce; in ParseAndFillUmtsAuthParamTest() local
1979 nonce.push_back(UMTS_AUTH_TYPE_TAG); in ParseAndFillUmtsAuthParamTest()
1980 pStaStateMachine->ParseAndFillUmtsAuthParam(nonce); in ParseAndFillUmtsAuthParamTest()
1981 nonce.clear(); in ParseAndFillUmtsAuthParamTest()
1982 nonce.push_back(UMTS_AUTS_TYPE_TAG); in ParseAndFillUmtsAuthParamTest()
1983 pStaStateMachine->ParseAndFillUmtsAuthParam(nonce); in ParseAndFillUmtsAuthParamTest()
/foundation/CastEngine/castengine_wifi_display/tests/unittest/protocol/rtsp/
H A Drtsp_unit_test.cpp194 const std::string &nonce = "nonce"; in HWTEST_F() local
197 auto ret = RtspCommon::GenerateAuthorization(username, realm, password, nonce, method, url); in HWTEST_F()
199 "Digest username=\"username\", realm=\"realm\", nonce=\"nonce\", uri=\"url\", response=\"00000000\""); in HWTEST_F()
440 const std::string &msg3 = "nonce=\"8fd7c44874480bd643d970149224da11\","; in HWTEST_F()
444 EXPECT_EQ(ret, "IP Camera(23435)\",nonce=\"8fd7c44874480bd643d970149224da11\",stale=\"FALSE"); in HWTEST_F()
455 const std::string &msg3 = "nonce=\"8fd7c44874480bd643d970149224da11\","; in HWTEST_F()

Completed in 25 milliseconds