Home
last modified time | relevance | path

Searched refs:cipher (Results 1 - 25 of 49) sorted by relevance

12

/foundation/communication/wifi/wifi/base/security_utils/src/
H A Dwifi_openssl_utils.cpp50 EVP_CIPHER *cipher = nullptr; in GetAesCipher() local
54 cipher = const_cast<EVP_CIPHER *>(EVP_aes_128_gcm()); in GetAesCipher()
57 cipher = const_cast<EVP_CIPHER *>(EVP_aes_256_gcm()); in GetAesCipher()
60 cipher = const_cast<EVP_CIPHER *>(EVP_aes_128_gcm()); in GetAesCipher()
62 return cipher; in GetAesCipher()
78 const EVP_CIPHER *cipher = GetAesCipher(info->aesType); in OpensslAesEncrypt() local
84 if (EVP_EncryptInit_ex(ctx, cipher, nullptr, nullptr, nullptr) != 1) { in OpensslAesEncrypt()
138 const EVP_CIPHER *cipher = GetAesCipher(info->aesType); in OpensslAesDecrypt() local
145 if (EVP_DecryptInit_ex(ctx, cipher, nullptr, nullptr, nullptr) != 1) { in OpensslAesDecrypt()
/foundation/communication/dsoftbus/core/transmission/trans_channel/proxy/src/
H A Dsoftbus_proxychannel_control.c42 msgHead.cipher = (msgHead.cipher | ENCRYPTED); in TransProxySendInnerMessage()
69 static int32_t SetCipherOfHandshakeMsg(ProxyChannelInfo *info, uint8_t *cipher) in SetCipherOfHandshakeMsg() argument
74 TRANS_LOGE(TRANS_CTRL, "get authId for cipher err"); in SetCipherOfHandshakeMsg()
97 *cipher |= ENCRYPTED; in SetCipherOfHandshakeMsg()
99 *cipher |= AUTH_SERVER_SIDE; in SetCipherOfHandshakeMsg()
102 *cipher |= USE_BLE_CIPHER; in SetCipherOfHandshakeMsg()
117 msgHead.cipher = CS_MODE; in TransProxyHandshake()
119 if (SetCipherOfHandshakeMsg(info, &msgHead.cipher) != SOFTBUS_OK) { in TransProxyHandshake()
120 TRANS_LOGE(TRANS_CTRL, "set cipher fai in TransProxyHandshake()
[all...]
H A Dsoftbus_proxychannel_message.c50 msg->msgHead.cipher = *ptr; in TransProxyParseMessageHead()
72 *(buf + offset) = msgHead->cipher; in TransProxyPackMessageHead()
181 static int32_t GetAuthIdByHandshakeMsg(uint32_t connId, uint8_t cipher, AuthHandle *authHandle, int32_t index) in GetAuthIdByHandshakeMsg() argument
187 bool isBle = ((cipher & USE_BLE_CIPHER) != 0); in GetAuthIdByHandshakeMsg()
197 bool isAuthServer = !((cipher & AUTH_SERVER_SIDE) != 0); in GetAuthIdByHandshakeMsg()
251 if ((msg->msgHead.cipher & ENCRYPTED) != 0) { in TransProxyParseMessage()
257 TRANS_LOGD(TRANS_CTRL, "prxoy recv handshake cipher=0x%{public}02x", msg->msgHead.cipher); in TransProxyParseMessage()
258 ret = GetAuthIdByHandshakeMsg(msg->connId, msg->msgHead.cipher, auth, in TransProxyParseMessage()
355 if ((msg->cipher in TransProxyPackMessage()
[all...]
/foundation/communication/dsoftbus/core/bus_center/lnn/net_ledger/common/src/
H A Dlnn_huks_utils.c577 uint8_t *cipher = (uint8_t *)SoftBusCalloc(inData->size); in LnnEncryptDataByHuks() local
578 if (cipher == NULL) { in LnnEncryptDataByHuks()
582 struct HksBlob cipherText = {inData->size, cipher}; in LnnEncryptDataByHuks()
585 (void)memset_s(cipher, inData->size, 0x0, inData->size); in LnnEncryptDataByHuks()
586 SoftBusFree(cipher); in LnnEncryptDataByHuks()
592 (void)memset_s(cipher, inData->size, 0x0, inData->size); in LnnEncryptDataByHuks()
593 SoftBusFree(cipher); in LnnEncryptDataByHuks()
596 (void)memset_s(cipher, inData->size, 0x0, inData->size); in LnnEncryptDataByHuks()
597 SoftBusFree(cipher); in LnnEncryptDataByHuks()
653 uint8_t *cipher in LnnCeEncryptDataByHuks() local
[all...]
/foundation/communication/dsoftbus/components/nstackx/nstackx_util/core/
H A Dnstackx_openssl.c98 const EVP_CIPHER *cipher = GetCipher(cryptPara); in InitEncryptCtx() local
100 if (cipher == NULL ||cryptPara->aadLen == 0 || cryptPara->ctx == NULL) { in InitEncryptCtx()
111 if (EVP_EncryptInit_ex(cryptPara->ctx, cipher, NULL, cryptPara->key, cryptPara->iv) == 0) { in InitEncryptCtx()
178 const EVP_CIPHER *cipher = GetCipher(cryptPara); in InitDecryptCtx() local
180 if (cipher == NULL || cryptPara->ivLen != GCM_IV_LENGTH || cryptPara->aadLen == 0 || cryptPara->ctx == NULL) { in InitDecryptCtx()
184 if (EVP_DecryptInit_ex(cryptPara->ctx, cipher, NULL, cryptPara->key, cryptPara->iv) == 0) { in InitDecryptCtx()
/foundation/communication/wifi/wifi/services/wifi_standard/wifi_framework/wifi_manage/wifi_native/client/hdi_client/hdi_interface/
H A Dwifi_hdi_common.c211 static char* HdiGetCipherTxt(char *pos, char *end, int cipher) in HdiGetCipherTxt() argument
219 ret = HdiGetCipherInfo(pos, end, cipher, "+"); in HdiGetCipherTxt()
393 int HdiCheckValidWise(int cipher) in HdiCheckValidWise() argument
395 return cipher == HDI_CIPHER_CCMP_256 || in HdiCheckValidWise()
396 cipher == HDI_CIPHER_GCMP_256 || in HdiCheckValidWise()
397 cipher == HDI_CIPHER_CCMP || in HdiCheckValidWise()
398 cipher == HDI_CIPHER_GCMP || in HdiCheckValidWise()
399 cipher == HDI_CIPHER_TKIP; in HdiCheckValidWise()
402 int HdiCheckValidGroup(int cipher) in HdiCheckValidGroup() argument
404 return HdiCheckValidWise(cipher) || in HdiCheckValidGroup()
[all...]
/foundation/communication/dsoftbus/adapter/common/openssl/
H A Dsoftbus_adapter_crypto.c68 EVP_CIPHER *cipher = GetGcmAlgorithmByKeyLen(cipherkey->keyLen); in OpensslEvpInit() local
69 if (cipher == NULL) { in OpensslEvpInit()
70 COMM_LOGE(COMM_ADAPTER, "get cipher fail."); in OpensslEvpInit()
80 ret = EVP_EncryptInit_ex(*ctx, cipher, NULL, NULL, NULL); in OpensslEvpInit()
87 ret = EVP_DecryptInit_ex(*ctx, cipher, NULL, NULL, NULL); in OpensslEvpInit()
493 EVP_CIPHER *cipher = NULL; in SoftBusEncryptDataByCtr() local
494 if (!(cipher = GetCtrAlgorithmByKeyLen(key->keyLen))) { in SoftBusEncryptDataByCtr()
495 return HandleError(ctx, "get cipher failed"); in SoftBusEncryptDataByCtr()
500 if (EVP_EncryptInit_ex(ctx, cipher, NULL, key->key, key->iv) != 1) { in SoftBusEncryptDataByCtr()
524 EVP_CIPHER *cipher in SoftBusDecryptDataByCtr() local
[all...]
H A Dsoftbus_aes_encrypt.c283 EVP_CIPHER *cipher = GetSslGcmAlgorithmByKeyLen(keyLen); in GcmOpensslEvpInit() local
284 if (cipher == NULL) { in GcmOpensslEvpInit()
295 if (EVP_EncryptInit_ex(*ctx, cipher, NULL, NULL, NULL) != 1) { in GcmOpensslEvpInit()
302 if (EVP_DecryptInit_ex(*ctx, cipher, NULL, NULL, NULL) != 1) { in GcmOpensslEvpInit()
/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/test/moduletest/common/distributeddb/include/
H A Ddistributeddb_nb_test_tools.h42 DistributedDB::CipherType cipher = DistributedDB::CipherType::DEFAULT; // cipher type member
43 std::vector<uint8_t> passwd; // cipher password
61 Option(bool createIfNecessary, bool isMemoryDb, bool isEncryptedDb, DistributedDB::CipherType cipher, in Option()
64 cipher(cipher), passwd(passwd) in Option()
68 Option(bool createIfNecessary, bool isMemoryDb, bool isEncryptedDb, const DistributedDB::CipherType &cipher, in Option()
72 cipher(cipher), passwd(passwd), secOption(secOption), observer(observer), notifier(notifier) in Option()
/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/common/src/
H A Dparam_check_utils.cpp101 bool ParamCheckUtils::CheckEncryptedParameter(CipherType cipher, const CipherPassword &passwd) in CheckEncryptedParameter() argument
103 if (cipher != CipherType::DEFAULT && cipher != CipherType::AES_256_GCM) { in CheckEncryptedParameter()
104 LOGE("Invalid cipher type!"); in CheckEncryptedParameter()
184 if (!ParamCheckUtils::CheckEncryptedParameter(option.cipher, option.passwd)) { in CheckAndTransferAutoLaunchParam()
/foundation/communication/dsoftbus/tests/core/transmission/trans_channel/proxy_channel/
H A Dtrans_proxy_message_test.cpp355 msg.cipher = 0; in HWTEST_F()
362 msg.cipher |= ENCRYPTED; in HWTEST_F()
393 msg.cipher = 0; in HWTEST_F()
398 msg.cipher |= ENCRYPTED; in HWTEST_F()
440 msg.msgHead.cipher = 0; in HWTEST_F()
446 msg.msgHead.cipher = 1; in HWTEST_F()
467 msg.msgHead.cipher = 1; in HWTEST_F()
503 msg.msgHead.cipher = 1; in HWTEST_F()
539 msg.msgHead.cipher |= USE_BLE_CIPHER; in HWTEST_F()
634 /* test pack handshake msg failed after pass set cipher */ in HWTEST_F()
[all...]
H A Dsoftbus_proxychannel_message_test.cpp416 msg.cipher = 0; in HWTEST_F()
423 msg.cipher |= ENCRYPTED; in HWTEST_F()
443 msg.cipher = 0; in HWTEST_F()
449 msg.cipher |= ENCRYPTED; in HWTEST_F()
492 msg.msgHead.cipher = 0; in HWTEST_F()
498 msg.msgHead.cipher = 1; in HWTEST_F()
520 msg.msgHead.cipher = 1; in HWTEST_F()
550 msg.msgHead.cipher = 1; in HWTEST_F()
572 msg.msgHead.cipher |= USE_BLE_CIPHER; in HWTEST_F()
975 msg.msgHead.cipher in HWTEST_F()
[all...]
H A Dsoftbus_proxychannel_manager_test.cpp857 msg->msgHead.cipher = TEST_NUMBER_ONE; in HWTEST_F()
932 msg->msgHead.cipher = TEST_VALID_CHANNEL_ID; in HWTEST_F()
954 msg->msgHead.cipher = TEST_VALID_CHANNEL_ID; in HWTEST_F()
1001 msg->msgHead.cipher = TEST_VALID_CHANNEL_ID; in HWTEST_F()
1030 msg->msgHead.cipher = TEST_VALID_CHANNEL_ID; in HWTEST_F()
1376 msgHead->cipher = ENCRYPTED; in HWTEST_F()
1382 msg->msgHead.cipher = TEST_NUMBER_ONE; in HWTEST_F()
/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/include/
H A Dauto_launch_export.h28 CipherType cipher = CipherType::DEFAULT; member
/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/common/include/
H A Dparam_check_utils.h42 static bool CheckEncryptedParameter(CipherType cipher, const CipherPassword &passwd);
/foundation/communication/netstack/frameworks/native/tls_socket/src/
H A Dtls_context.cpp60 NETSTACK_LOGE("Error setting the cipher list"); in SetCipherList()
80 const SSL_CIPHER *cipher = sk_SSL_CIPHER_value(sk, i); in GetCiphers() local
81 cipherSuite.cipherId_ = SSL_CIPHER_get_id(cipher); in GetCiphers()
82 cipherSuite.cipherName_ = SSL_CIPHER_get_name(cipher); in GetCiphers()
331 NETSTACK_LOGE("Failed to set cipher suite"); in InitTlsContext()
H A Dtls_context_server.cpp59 NETSTACK_LOGE("Error setting the cipher list"); in SetCipherList()
79 const SSL_CIPHER *cipher = sk_SSL_CIPHER_value(sk, i); in GetCiphers() local
80 cipherSuite.cipherId_ = SSL_CIPHER_get_id(cipher); in GetCiphers()
81 cipherSuite.cipherName_ = SSL_CIPHER_get_name(cipher); in GetCiphers()
325 NETSTACK_LOGE("Failed to set cipher suite"); in InitTlsContext()
H A Dtls_config_enhanced.cpp242 for (const auto &cipher : cipherSuite) { in ConvertCipherSuiteToCipherString()
243 auto innerName = GetInnerNameFromCipherSuite(cipher); in ConvertCipherSuiteToCipherString()
/foundation/communication/dsoftbus/tests/core/transmission/fuzztest/transproxyonmessagereceived_fuzzer/
H A Dtransproxyonmessagereceived_fuzzer.cpp47 proxyMessageHead->cipher = *(reinterpret_cast<const uint8_t *>(data)); in InitProxyMessageHead()
/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/interfaces/include/
H A Dkv_store_delegate.h35 CipherType cipher = CipherType::DEFAULT; member
/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/interfaces/src/
H A Dkv_store_delegate_manager.cpp106 properties.SetPassword(option.cipher, option.passwd); in InitPropWithNbOption()
150 properties.SetPassword(option.cipher, option.passwd); in InitPropWithOption()
205 if (!ParamCheckUtils::CheckEncryptedParameter(option.cipher, option.passwd)) { in GetKvStore()
285 if (!ParamCheckUtils::CheckEncryptedParameter(option.cipher, option.passwd)) { in GetKvStoreParamCheck()
/foundation/communication/dsoftbus/core/transmission/trans_channel/proxy/include/
H A Dsoftbus_proxychannel_message.h70 uint8_t cipher; member
81 AuthHandle authHandle; /* for cipher */
131 AuthHandle authHandle; /* for cipher */
/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/interfaces/src/relational/
H A Drelational_store_manager.cpp105 if (!ParamCheckUtils::CheckEncryptedParameter(option.cipher, option.passwd) || option.iterateTimes == 0) { in OpenStore()
108 properties.SetCipherArgs(option.cipher, option.passwd, option.iterateTimes); in OpenStore()
/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/interfaces/include/relational/
H A Drelational_store_delegate.h40 CipherType cipher = CipherType::DEFAULT; member
/foundation/distributeddatamgr/kv_store/kvstoremock/frameworks/innerkitsimpl/kvdb/src/
H A Dstore_factory.cpp136 dbOption.cipher = DistributedDB::CipherType::AES_256_GCM; in GetDBOption()

Completed in 25 milliseconds

12