Home
last modified time | relevance | path

Searched refs:cipher (Results 1 – 25 of 43) sorted by relevance

12

/foundation/communication/dsoftbus/core/transmission/trans_channel/proxy/src/
Dsoftbus_proxychannel_control.c42 msgHead.cipher = (msgHead.cipher | ENCRYPTED); in TransProxySendInnerMessage()
56 static int32_t SetCipherOfHandshakeMsg(uint32_t channelId, uint8_t *cipher) in SetCipherOfHandshakeMsg() argument
75 *cipher |= ENCRYPTED; in SetCipherOfHandshakeMsg()
77 *cipher |= AUTH_SERVER_SIDE; in SetCipherOfHandshakeMsg()
80 *cipher |= USE_BLE_CIPHER; in SetCipherOfHandshakeMsg()
95 msgHead.cipher = CS_MODE; in TransProxyHandshake()
97 if (SetCipherOfHandshakeMsg(info->channelId, &msgHead.cipher) != SOFTBUS_OK) { in TransProxyHandshake()
105 "handshake myId=%d cipher=0x%02x", msgHead.myId, msgHead.cipher); in TransProxyHandshake()
142 msgHead.cipher = (msgHead.cipher | ENCRYPTED); in TransProxyAckHandshake()
186 msgHead.cipher = (msgHead.cipher | ENCRYPTED); in TransProxyKeepalive()
[all …]
Dsoftbus_proxychannel_message.c51 msg->msgHead.cipher = *ptr; in TransProxyParseMessageHead()
72 *(buf + offset) = msgHead->cipher; in TransProxyPackMessageHead()
183 static int64_t GetAuthIdByHandshakeMsg(uint32_t connId, uint8_t cipher) in GetAuthIdByHandshakeMsg() argument
190 …SoftBusLog(SOFTBUS_LOG_TRAN, SOFTBUS_LOG_INFO, "cipher:%d, connInfoType:%d", cipher, connInfo.type… in GetAuthIdByHandshakeMsg()
191 bool isBle = ((cipher & USE_BLE_CIPHER) != 0); in GetAuthIdByHandshakeMsg()
201 bool isAuthServer = !((cipher & AUTH_SERVER_SIDE) != 0); in GetAuthIdByHandshakeMsg()
215 bool isEncrypted = ((msg->msgHead.cipher & ENCRYPTED) != 0); in TransProxyParseMessage()
219 "prxoy recv handshake cipher: 0x%02x", msg->msgHead.cipher); in TransProxyParseMessage()
220 msg->authId = GetAuthIdByHandshakeMsg(msg->connId, msg->msgHead.cipher); in TransProxyParseMessage()
311 if ((msg->cipher & ENCRYPTED) == 0) { in TransProxyPackMessage()
/foundation/communication/dsoftbus/components/nstackx/nstackx_util/core/
Dnstackx_openssl.c54 const EVP_CIPHER *cipher = NULL; in InitEncryptCtx() local
56 cipher = EVP_get_cipherbyname(CHACHA20_POLY1305_NAME); in InitEncryptCtx()
60 cipher = EVP_aes_128_gcm(); in InitEncryptCtx()
63 cipher = EVP_aes_192_gcm(); in InitEncryptCtx()
66 cipher = EVP_aes_256_gcm(); in InitEncryptCtx()
84 if (EVP_EncryptInit_ex(cryptPara->ctx, cipher, NULL, cryptPara->key, cryptPara->iv) == 0) { in InitEncryptCtx()
150 const EVP_CIPHER *cipher = NULL; in InitDecryptCtx() local
152 cipher = EVP_get_cipherbyname(CHACHA20_POLY1305_NAME); in InitDecryptCtx()
156 cipher = EVP_aes_128_gcm(); in InitDecryptCtx()
159 cipher = EVP_aes_192_gcm(); in InitDecryptCtx()
[all …]
/foundation/communication/dsoftbus/core/bus_center/lnn/net_ledger/common/src/
Dlnn_huks_utils.c281 uint8_t *cipher = (uint8_t *)SoftBusCalloc(inData->size); in LnnEncryptDataByHuks() local
282 if (cipher == NULL) { in LnnEncryptDataByHuks()
286 struct HksBlob cipherText = {inData->size, cipher}; in LnnEncryptDataByHuks()
289 (void)memset_s(cipher, sizeof(cipher), 0x0, sizeof(cipher)); in LnnEncryptDataByHuks()
290 SoftBusFree(cipher); in LnnEncryptDataByHuks()
296 (void)memset_s(cipher, sizeof(cipher), 0x0, sizeof(cipher)); in LnnEncryptDataByHuks()
297 SoftBusFree(cipher); in LnnEncryptDataByHuks()
300 (void)memset_s(cipher, sizeof(cipher), 0x0, sizeof(cipher)); in LnnEncryptDataByHuks()
301 SoftBusFree(cipher); in LnnEncryptDataByHuks()
/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/common/src/
Dparam_check_utils.cpp81 bool ParamCheckUtils::CheckEncryptedParameter(CipherType cipher, const CipherPassword &passwd) in CheckEncryptedParameter() argument
83 if (cipher != CipherType::DEFAULT && cipher != CipherType::AES_256_GCM) { in CheckEncryptedParameter()
162 if (!ParamCheckUtils::CheckEncryptedParameter(option.cipher, option.passwd)) { in CheckAndTransferAutoLaunchParam()
/foundation/communication/wifi/wifi/services/wifi_standard/wifi_hal/hdi/src/
Dwifi_hdi_common.c106 static char* HdiGetCipherTxt(char *pos, char *end, int cipher) in HdiGetCipherTxt() argument
114 ret = HdiGetCipherInfo(pos, end, cipher, "+"); in HdiGetCipherTxt()
266 int HdiCheckValidWise(int cipher) in HdiCheckValidWise() argument
268 return cipher == HDI_CIPHER_CCMP_256 || in HdiCheckValidWise()
269 cipher == HDI_CIPHER_GCMP_256 || in HdiCheckValidWise()
270 cipher == HDI_CIPHER_CCMP || in HdiCheckValidWise()
271 cipher == HDI_CIPHER_GCMP || in HdiCheckValidWise()
272 cipher == HDI_CIPHER_TKIP; in HdiCheckValidWise()
275 int HdiCheckValidGroup(int cipher) in HdiCheckValidGroup() argument
277 return HdiCheckValidWise(cipher) || in HdiCheckValidGroup()
[all …]
/foundation/communication/dsoftbus/adapter/common/openssl/
Dsoftbus_adapter_crypto.c62 EVP_CIPHER *cipher = GetGcmAlgorithmByKeyLen(cipherkey->keyLen); in OpensslEvpInit() local
63 if (cipher == NULL) { in OpensslEvpInit()
74 ret = EVP_EncryptInit_ex(*ctx, cipher, NULL, NULL, NULL); in OpensslEvpInit()
81 ret = EVP_DecryptInit_ex(*ctx, cipher, NULL, NULL, NULL); in OpensslEvpInit()
440 EVP_CIPHER *cipher = NULL; in SoftBusEncryptDataByCtr() local
441 if (!(cipher = GetCtrAlgorithmByKeyLen(key->keyLen))) { in SoftBusEncryptDataByCtr()
447 if (EVP_EncryptInit_ex(ctx, cipher, NULL, key->key, key->iv) != 1) { in SoftBusEncryptDataByCtr()
471 EVP_CIPHER *cipher = NULL; in SoftBusDecryptDataByCtr() local
472 if (!(cipher = GetCtrAlgorithmByKeyLen(key->keyLen))) { in SoftBusDecryptDataByCtr()
478 if (EVP_DecryptInit_ex(ctx, cipher, NULL, key->key, key->iv) != 1) { in SoftBusDecryptDataByCtr()
/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/test/moduletest/common/distributeddb/include/
Ddistributeddb_nb_test_tools.h42 DistributedDB::CipherType cipher = DistributedDB::CipherType::DEFAULT; // cipher type member
61 …tion(bool createIfNecessary, bool isMemoryDb, bool isEncryptedDb, DistributedDB::CipherType cipher, in Option()
64 cipher(cipher), passwd(passwd) in Option()
68 …ol createIfNecessary, bool isMemoryDb, bool isEncryptedDb, const DistributedDB::CipherType &cipher, in Option()
72cipher(cipher), passwd(passwd), secOption(secOption), observer(observer), notifier(notifier) in Option()
Ddistributed_test_tools.h53 DistributedDB::CipherType cipher = DistributedDB::CipherType::DEFAULT; // cipher type member
60 cipher(cipher1), passwd(passwd1) in KvOption()
/foundation/communication/netstack/frameworks/native/tls_socket/src/
Dtls_context.cpp77 const SSL_CIPHER *cipher = sk_SSL_CIPHER_value(sk, i); in GetCiphers() local
78 cipherSuite.cipherId_ = SSL_CIPHER_get_id(cipher); in GetCiphers()
79 cipherSuite.cipherName_ = SSL_CIPHER_get_name(cipher); in GetCiphers()
Dtls_context_server.cpp77 const SSL_CIPHER *cipher = sk_SSL_CIPHER_value(sk, i); in GetCiphers() local
78 cipherSuite.cipherId_ = SSL_CIPHER_get_id(cipher); in GetCiphers()
79 cipherSuite.cipherName_ = SSL_CIPHER_get_name(cipher); in GetCiphers()
/foundation/communication/dsoftbus/tests/core/transmission/fuzztest/transproxyonmessagereceived_fuzzer/
Dtransproxyonmessagereceived_fuzzer.cpp38 mad.cipher = *(reinterpret_cast<const uint8_t*>(data)); in TransProxyonMessageReceivedTest()
/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/common/include/
Dparam_check_utils.h39 static bool CheckEncryptedParameter(CipherType cipher, const CipherPassword &passwd);
/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/include/
Dauto_launch_export.h28 CipherType cipher = CipherType::DEFAULT; member
/foundation/communication/dsoftbus/tests/core/transmission/trans_channel/proxy_channel/
Dtrans_proxy_message_test.cpp356 msg.cipher = 0;
363 msg.cipher |= ENCRYPTED;
395 msg.cipher = 0;
400 msg.cipher |= ENCRYPTED;
443 msg.msgHead.cipher = 0;
449 msg.msgHead.cipher = 1;
471 msg.msgHead.cipher = 1;
508 msg.msgHead.cipher = 1;
544 msg.msgHead.cipher |= USE_BLE_CIPHER;
/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/interfaces/src/relational/
Drelational_store_manager.cpp96 …if (!ParamCheckUtils::CheckEncryptedParameter(option.cipher, option.passwd) || option.iterateTimes… in OpenStore()
99 properties.SetCipherArgs(option.cipher, option.passwd, option.iterateTimes); in OpenStore()
/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/interfaces/include/
Dkv_store_delegate.h35 CipherType cipher = CipherType::DEFAULT; member
Dkv_store_nb_delegate.h41 CipherType cipher = CipherType::DEFAULT; member
/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/interfaces/include/relational/
Drelational_store_delegate.h40 CipherType cipher = CipherType::DEFAULT; member
/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/interfaces/src/
Dkv_store_delegate_manager.cpp104 properties.SetPassword(option.cipher, option.passwd); in InitPropWithNbOption()
142 properties.SetPassword(option.cipher, option.passwd); in InitPropWithOption()
189 if (!ParamCheckUtils::CheckEncryptedParameter(option.cipher, option.passwd)) { in GetKvStore()
267 if (!ParamCheckUtils::CheckEncryptedParameter(option.cipher, option.passwd)) { in GetKvStoreParamCheck()
/foundation/communication/dsoftbus/core/transmission/trans_channel/proxy/include/
Dsoftbus_proxychannel_message.h69 uint8_t cipher; member
/foundation/distributeddatamgr/kv_store/kvstoremock/frameworks/innerkitsimpl/kvdb/src/
Dstore_factory.cpp136 dbOption.cipher = DistributedDB::CipherType::AES_256_GCM; in GetDBOption()
/foundation/communication/dsoftbus/components/mbedtls/
DBUILD.gn34 "$library/cipher.c",
/foundation/communication/netstack/frameworks/js/napi/tls/src/
Dtlssocket_exec.cpp345 for (const auto &cipher : context->cipherSuites_) { in GetCipherSuitesCallback() local
346 napi_value cipherSuite = NapiUtils::CreateStringUtf8(context->GetEnv(), cipher); in GetCipherSuitesCallback()
/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/test/unittest/common/syncer/
Ddistributeddb_relational_ver_p2p_sync_test.cpp95 option.cipher = CipherType::DEFAULT; in OpenStore()
1172 param.option.cipher = CipherType::DEFAULT; in __anon0abea7530a02()
1331 param.option.cipher = CipherType::DEFAULT; in __anon0abea7530f02()
1613 param.option.cipher = CipherType::DEFAULT; in __anon0abea7531402()
1667 option.cipher = CipherType::DEFAULT;
1843 param.option.cipher = CipherType::DEFAULT; in __anon0abea7531702()
1882 option.cipher = CipherType::DEFAULT;
2620 encryptedParam.option.cipher = CipherType::DEFAULT;
2705 encryptedParam.option.cipher = CipherType::DEFAULT;

12