/base/security/device_auth/services/protocol/inc/pake_protocol/ |
H A D | pake_defs.h | 50 Uint8Buff salt; 51 Uint8Buff psk; 52 Uint8Buff challengeSelf; 53 Uint8Buff challengePeer; 54 Uint8Buff base; 55 Uint8Buff eskSelf; 56 Uint8Buff epkSelf; 57 Uint8Buff epkPeer; 58 Uint8Buff idSelf; 59 Uint8Buff idPee [all...] |
/base/security/device_auth/deps_adapter/key_management_adapter/interfaces/ |
H A D | alg_defs.h | 36 Uint8Buff authId; 82 typedef int32_t (*Sha256Func)(const Uint8Buff *message, Uint8Buff *hash); 84 typedef int32_t (*GenerateRandomFunc)(Uint8Buff *rand); 86 typedef int32_t (*ComputeHmacFunc)(const KeyParams *keyParams, const Uint8Buff *message, Uint8Buff *outHmac); 88 typedef int32_t (*ComputeHmacWithThreeStageFunc)(const KeyParams *keyParams, const Uint8Buff *message, 89 Uint8Buff *outHmac); 91 typedef int32_t (*ComputeHkdfFunc)(const KeyParams *keyParams, const Uint8Buff *salt, const Uint8Buff *keyInf [all...] |
/base/security/device_auth/services/legacy/authenticators/inc/account_unrelated/ |
H A D | das_task_common.h | 28 int32_t GenerateKeyAlias(const Uint8Buff *pkgName, const Uint8Buff *serviceType, const KeyAliasType keyType, 29 const Uint8Buff *authId, Uint8Buff *outKeyAlias); 30 int32_t GeneratePseudonymPskAlias(const Uint8Buff *serviceType, const Uint8Buff *peerAuthId, Uint8Buff *outKeyAlias); 31 int32_t GetIdPeer(const CJson *in, const char *peerIdKey, const Uint8Buff *authIdSelf, Uint8Buff *authIdPeer); 32 int32_t GetAndCheckAuthIdPeer(const CJson *in, const Uint8Buff *authIdSel [all...] |
H A D | das_token_manager.h | 24 Uint8Buff pkgName; 25 Uint8Buff serviceType; 26 Uint8Buff authId; 36 int32_t (*getPublicKey)(const TokenManagerParams *, Uint8Buff *);
|
/base/security/device_auth/common_lib/interfaces/ |
H A D | uint8buff_utils.h | 25 } Uint8Buff; typedef 31 int32_t InitUint8Buff(Uint8Buff *buff, uint32_t buffLen); 32 int32_t DeepCopyUint8Buff(const Uint8Buff *buff, Uint8Buff *newBuff); 33 void FreeUint8Buff(Uint8Buff *buff); 34 void ClearFreeUint8Buff(Uint8Buff *buff); 35 bool IsUint8BuffValid(const Uint8Buff *buff, uint32_t maxLen); 36 int32_t ToLowerCase(Uint8Buff *buff);
|
/base/security/device_auth/services/protocol/inc/iso_protocol/ |
H A D | iso_protocol_common.h | 30 Uint8Buff randSelf; 31 Uint8Buff randPeer; 32 Uint8Buff authIdSelf; // need malloc by caller 33 Uint8Buff authIdPeer; // need malloc by caller 34 Uint8Buff sessionKey; 48 int IsoClientCheckAndGenToken(IsoBaseParams *params, const Uint8Buff *peerToken, Uint8Buff *selfToken); 51 int IsoServerGenRandomAndToken(IsoBaseParams *params, Uint8Buff *selfTokenBuf); 52 int IsoServerGenSessionKeyAndCalToken(IsoBaseParams *params, const Uint8Buff *tokenFromPeer, Uint8Buff *tokenToPee [all...] |
/base/security/device_auth/services/legacy/authenticators/inc/account_related/creds_manager/ |
H A D | asy_token_manager.h | 25 Uint8Buff version; 26 Uint8Buff userId; 27 Uint8Buff deviceId; 28 Uint8Buff devicePk; 32 Uint8Buff pkInfoStr; 34 Uint8Buff pkInfoSignature; 35 Uint8Buff serverPk; 45 Uint8Buff *keyAlias, bool isServerPkAlias);
|
/base/security/device_auth/services/legacy/authenticators/inc/account_related/auth/pake_v2_auth_task/ |
H A D | pake_v2_auth_task_common.h | 33 Uint8Buff deviceIdSelf; 34 Uint8Buff deviceIdPeer; 35 Uint8Buff devIdSelf; 36 Uint8Buff devIdPeer; 40 Uint8Buff pkInfoSelf; 41 Uint8Buff pkInfoSignSelf; 43 Uint8Buff pkPeerBuff; 44 Uint8Buff pkInfoPeer; 45 Uint8Buff pkInfoSignPeer;
|
/base/security/device_auth/services/session_manager/inc/session/v2/auth_sub_session/protocol_lib/ |
H A D | base_protocol.h | 25 Uint8Buff selfMsg; 26 Uint8Buff peerMsg; 36 Uint8Buff sessionKey; 40 int32_t (*setPsk)(BaseProtocol *, const Uint8Buff *); 41 int32_t (*setSelfProtectedMsg)(BaseProtocol *, const Uint8Buff *); 42 int32_t (*setPeerProtectedMsg)(BaseProtocol *, const Uint8Buff *); 43 int32_t (*getSessionKey)(BaseProtocol *, Uint8Buff *);
|
/base/security/device_auth/services/legacy/authenticators/src/account_unrelated/creds_manager/ |
H A D | das_standard_token_manager.c | 23 Uint8Buff pkgNameBuff = { params->pkgName.val, params->pkgName.length }; in RegisterLocalIdentityStd() 24 Uint8Buff serviceTypeBuff = { params->serviceType.val, params->serviceType.length }; in RegisterLocalIdentityStd() 27 Uint8Buff keyAliasBuff = { keyAliasVal, PAKE_KEY_ALIAS_LEN }; in RegisterLocalIdentityStd() 28 Uint8Buff authIdBuff = { params->authId.val, params->authId.length }; in RegisterLocalIdentityStd() 56 Uint8Buff pkgNameBuff = { params->pkgName.val, params->pkgName.length }; in UnregisterLocalIdentityStd() 57 Uint8Buff serviceTypeBuff = { params->serviceType.val, params->serviceType.length }; in UnregisterLocalIdentityStd() 60 Uint8Buff pakeKeyAliasBuff = { pakeKeyAliasVal, PAKE_KEY_ALIAS_LEN }; in UnregisterLocalIdentityStd() 61 Uint8Buff authIdBuff = { params->authId.val, params->authId.length }; in UnregisterLocalIdentityStd() 104 static int32_t DeletePeerPubKey(int32_t osAccountId, const Uint8Buff *pkgNameBuff, const Uint8Buff *serviceTypeBuf [all...] |
H A D | das_lite_token_manager.c | 24 Uint8Buff pkgNameBuff = { params->pkgName.val, params->pkgName.length }; in UnregisterLocalIdentityLite() 25 Uint8Buff serviceTypeBuff = { params->serviceType.val, params->serviceType.length }; in UnregisterLocalIdentityLite() 28 Uint8Buff isoKeyAliasBuff = { isoKeyAliasVal, ISO_KEY_ALIAS_LEN }; in UnregisterLocalIdentityLite() 29 Uint8Buff authIdBuff = { params->authId.val, params->authId.length }; in UnregisterLocalIdentityLite() 52 Uint8Buff pkgNameBuff = { params->pkgName.val, params->pkgName.length }; in DeletePeerAuthInfoLite() 53 Uint8Buff serviceTypeBuff = { params->serviceType.val, params->serviceType.length }; in DeletePeerAuthInfoLite() 56 Uint8Buff isoKeyAliasBuff = { isoKeyAliasVal, ISO_KEY_ALIAS_LEN }; in DeletePeerAuthInfoLite() 57 Uint8Buff authIdBuff = { params->authId.val, params->authId.length }; in DeletePeerAuthInfoLite() 77 Uint8Buff isoUpgradeKeyAliasBuff = { isoUpgradeKeyAliasVal, ISO_UPGRADE_KEY_ALIAS_LEN }; in DeletePeerAuthInfoLite()
|
/base/security/device_auth/deps_adapter/key_management_adapter/impl/inc/ |
H A D | mbedtls_ec_adapter.h | 30 int32_t MbedtlsHashToPoint(const Uint8Buff *hash, Uint8Buff *outEcPoint);
31 int32_t MbedtlsHashToPoint25519(const Uint8Buff *hash, Uint8Buff *outEcPoint);
32 int32_t MbedtlsAgreeSharedSecret(const KeyBuff *priKey, const KeyBuff *pubKey, Uint8Buff *sharedKey);
|
/base/security/device_auth/services/legacy/authenticators/inc/account_unrelated/pake_task/ |
H A D | common_standard_bind_exchange.h | 28 Uint8Buff pubKeySelf; 29 Uint8Buff pubKeyPeer; 30 Uint8Buff authInfo; 31 Uint8Buff exInfoCipher; 32 Uint8Buff nonce;
|
H A D | standard_exchange_message_util.h | 27 int32_t PackageNonceAndCipherToJson(const Uint8Buff *nonce, const Uint8Buff *cipher, CJson *data, const char *key); 28 int32_t ParseNonceAndCipherFromJson(Uint8Buff *nonce, Uint8Buff *cipher, const CJson *in, const char *key);
|
H A D | pake_base_cur_task.h | 42 Uint8Buff selfNextPseudonymId; 43 Uint8Buff selfNextPseudonymChallenge; 44 Uint8Buff peerNextPseudonymId; 52 Uint8Buff returnKey; 53 Uint8Buff nonce;
|
/base/security/device_auth/services/mk_agree/inc/ |
H A D | key_manager.h | 31 int32_t GenerateMk(int32_t osAccountId, const char *peerDeviceId, const Uint8Buff *peerPubKey); 33 int32_t GeneratePseudonymPsk(int32_t osAccountId, const char *peerDeviceId, const Uint8Buff *salt); 36 const Uint8Buff *saltBuff, Uint8Buff *returnHmac); 37 int32_t GetDevicePubKey(int32_t osAccountId, Uint8Buff *devicePk);
|
/base/security/device_auth/services/mk_agree/src/ |
H A D | key_manager.c | 36 static int32_t ConvertHashToAlias(const Uint8Buff *keyAliasHash, Uint8Buff *outKeyAlias) in ConvertHashToAlias() 59 static int32_t ConvertHashToAliasWithPrefix(const char *prefix, const Uint8Buff *keyAliasHash, Uint8Buff *keyAlias) in ConvertHashToAliasWithPrefix() 91 static int32_t GenerateDevKeyAlias(Uint8Buff *outKeyAlias) in GenerateDevKeyAlias() 100 Uint8Buff keyAliasHash = { hashValue, SHA256_LEN }; in GenerateDevKeyAlias() 101 Uint8Buff msgBuff = { (uint8_t *)selfUdid, HcStrlen(selfUdid) }; in GenerateDevKeyAlias() 114 static int32_t GenerateMkAlias(const char *peerDeviceId, Uint8Buff *keyAlias) in GenerateMkAlias() 116 Uint8Buff peerDevIdBuff = { (uint8_t *)peerDeviceId, HcStrlen(peerDeviceId) }; in GenerateMkAlias() 118 Uint8Buff keyAliasHas in GenerateMkAlias() [all...] |
/base/security/device_auth/services/legacy/authenticators/src/account_unrelated/common/ |
H A D | das_task_common.c | 167 static int32_t CombineServiceId(const Uint8Buff *pkgName, const Uint8Buff *serviceType, Uint8Buff *serviceId) in CombineServiceId() 170 Uint8Buff serviceIdPlain = { NULL, 0 }; in CombineServiceId() 201 static int32_t CombineKeyAlias(const Uint8Buff *serviceId, const Uint8Buff *keyType, in CombineKeyAlias() 202 const Uint8Buff *authId, Uint8Buff *keyAliasHash) in CombineKeyAlias() 205 Uint8Buff keyAliasBuff = { NULL, 0 }; in CombineKeyAlias() 245 static int32_t CombineKeyAliasForPseudonymPsk(const Uint8Buff *serviceTyp [all...] |
/base/security/device_auth/services/mk_agree/src/mock/ |
H A D | key_manager_mock.c | 25 int32_t GenerateMk(int32_t osAccountId, const char *peerDeviceId, const Uint8Buff *peerPubKey) in GenerateMk() 40 int32_t GeneratePseudonymPsk(int32_t osAccountId, const char *peerDeviceId, const Uint8Buff *salt) in GeneratePseudonymPsk() 56 const Uint8Buff *saltBuff, Uint8Buff *returnHmac) in GenerateAndSavePseudonymId() 66 int32_t GetDevicePubKey(int32_t osAccountId, Uint8Buff *devicePk) in GetDevicePubKey()
|
/base/security/device_auth/test/unittest/deviceauth/source/ |
H A D | mk_agree_test.cpp | 96 Uint8Buff peerPkBuff = { peerDevPkVal, peerDevPkLen }; in HWTEST_F() 107 Uint8Buff peerPkBuff = { nullptr, peerDevPkLen }; in HWTEST_F() 119 Uint8Buff peerPkBuff = { peerDevPkVal, 0 }; in HWTEST_F() 132 Uint8Buff peerPkBuff = { peerDevPkVal, peerDevPkLen }; in HWTEST_F() 155 Uint8Buff salt = { peerDevPkVal, peerDevPkLen }; in HWTEST_F() 166 Uint8Buff salt = { nullptr, 0 }; in HWTEST_F() 178 Uint8Buff salt = { peerDevPkVal, peerDevPkLen }; in HWTEST_F() 191 Uint8Buff salt = { peerDevPkVal, peerDevPkLen }; in HWTEST_F() 192 Uint8Buff tmpKcfData = { NULL, 0 }; in HWTEST_F() 207 Uint8Buff sal in HWTEST_F() [all...] |
/base/security/device_auth/services/creds_manager/inc/ |
H A D | creds_manager.h | 28 int32_t GetCredInfoByPeerUrl(const CJson *in, const Uint8Buff *presharedUrl, IdentityInfo **returnInfo); 30 const CJson *in, const Uint8Buff *presharedUrl, ProtocolAlgType protocolType, Uint8Buff *sharedSecret); 33 const CJson *in, const CertInfo *peerCertInfo, ProtocolAlgType protocolType, Uint8Buff *sharedSecret);
|
/base/security/device_auth/services/identity_manager/inc/ |
H A D | identity_common.h | 28 int32_t ConvertPsk(const Uint8Buff *srcPsk, Uint8Buff *sharedSecret); 29 int32_t SetPreSharedUrlForProof(const char *urlStr, Uint8Buff *preSharedUrl); 38 void FreeBuffData(Uint8Buff *buff);
|
/base/security/device_auth/services/legacy/authenticators/src/account_unrelated/pake_task/pake_v1_task/pake_v1_protocol_task/ |
H A D | pake_v1_protocol_task_common.c | 112 static int32_t GetInnerExtInfo(const Uint8Buff *extInfoBuff, Uint8Buff *innerExtInfo) in GetInnerExtInfo() 140 Uint8Buff peerKeyAlias = { peerKeyAliasVal, PAKE_KEY_ALIAS_LEN }; in LoadPseudonymFlagIfNeed() 142 Uint8Buff packageName = { (uint8_t *)params->packageName, HcStrlen(params->packageName) }; in LoadPseudonymFlagIfNeed() 143 Uint8Buff serviceType = { (uint8_t *)params->serviceType, HcStrlen(params->serviceType) }; in LoadPseudonymFlagIfNeed() 155 Uint8Buff extInfoBuff = { NULL, 0 }; in LoadPseudonymFlagIfNeed() 162 Uint8Buff innerExtInfo = { NULL, 0 }; in LoadPseudonymFlagIfNeed() 235 static void UpperToLowercase(Uint8Buff *hex) in UpperToLowercase() 244 static int32_t ConvertPakeV1Psk(const Uint8Buff *srcPsk, PakeParams *params) in ConvertPakeV1Psk() 264 static int32_t GeneratePskAlias(const PakeParams *params, Uint8Buff *pskKeyAlia [all...] |
/base/security/device_auth/services/session_manager/inc/session/v2/auth_sub_session/ |
H A D | auth_sub_session.h | 34 int32_t (*setPsk)(AuthSubSession *self, const Uint8Buff *psk); 35 int32_t (*setSelfProtectedMsg)(AuthSubSession *self, const Uint8Buff *selfMsg); 36 int32_t (*setPeerProtectedMsg)(AuthSubSession *self, const Uint8Buff *peerMsg); 37 int32_t (*getSessionKey)(AuthSubSession *self, Uint8Buff *returnSessionKey);
|
/base/security/device_auth/test/unittest/deviceauth/unit_test/source/ |
H A D | key_management_test.cpp | 74 Uint8Buff hashBuffer = { hashData, SHA256_LEN }; in HWTEST_F() 75 Uint8Buff pointBuffer = { pointData, EC_LEN }; in HWTEST_F() 76 Uint8Buff invalidBuffer = { hashData, 0 }; in HWTEST_F() 77 Uint8Buff shortPointBuffer = { hashData, EC_LEN - 1 }; in HWTEST_F() 95 Uint8Buff sharedKeyBuffer = { keyData, P256_PUBLIC_SIZE }; in HWTEST_F() 112 Uint8Buff msgBuff = { testMsgData, sizeof(testMsgData) }; in HWTEST_F() 113 Uint8Buff hashBuff = { hashData, SHA_256_LENGTH }; in HWTEST_F() 123 Uint8Buff randBuff = { randData, DEFAULT_RAND_LEN }; in HWTEST_F() 133 Uint8Buff sharedKey = { keyData, P256_PUBLIC_SIZE }; in HWTEST_F() 153 Uint8Buff baseBuf in HWTEST_F() [all...] |