/drivers/peripheral/user_auth/hdi_service/adaptor/src/ |
H A D | adaptor_algorithm.c | 51 keyPair->pubKey = CreateBufferBySize(ED25519_FIX_PUBKEY_BUFFER_SIZE); in CreateEd25519KeyPair() 52 if (keyPair->pubKey == NULL) { in CreateEd25519KeyPair() 60 DestoryBuffer(keyPair->pubKey); in CreateEd25519KeyPair() 72 if (keyPair->pubKey != NULL) { in DestoryKeyPair() 73 DestoryBuffer(keyPair->pubKey); in DestoryKeyPair() 87 if (!CheckBufferWithSize(keyPair->pubKey, ED25519_FIX_PUBKEY_BUFFER_SIZE)) { in IsEd25519KeyPairValid() 119 size_t pubKeySize = keyPair->pubKey->maxSize; in GenerateEd25519KeyPair() 120 if (EVP_PKEY_get_raw_public_key(key, keyPair->pubKey->buf, &pubKeySize) != OPENSSL_SUCCESS) { in GenerateEd25519KeyPair() 124 keyPair->pubKey->contentSize = pubKeySize; in GenerateEd25519KeyPair() 190 int32_t Ed25519Verify(const Buffer *pubKey, cons argument [all...] |
/drivers/peripheral/user_auth/test/unittest/service_test/src/ |
H A D | signature_operation.cpp | 261 Buffer *pubKey = g_keyPair->pubKey; in GetExecutorPublicKey() local 262 vPubKey.resize(pubKey->contentSize); in GetExecutorPublicKey() 263 if (memcpy_s(&vPubKey[0], pubKey->contentSize, pubKey->buf, pubKey->contentSize) != EOK) { in GetExecutorPublicKey()
|
/drivers/peripheral/pin_auth/test/unittest/pin_auth/adaptor/src/ |
H A D | adaptor_algorithm_test.cpp | 58 keyPair2.pubKey = nullptr; in HWTEST_F() 67 keyPair3.pubKey = CopyBuffer(data); in HWTEST_F() 68 EXPECT_NE(keyPair3.pubKey, nullptr); in HWTEST_F() 71 DestroyBuffer(keyPair3.pubKey); in HWTEST_F() 135 result = Ed25519Verify(keyPair->pubKey, nullptr, signContent); in HWTEST_F() 138 result = Ed25519Verify(keyPair->pubKey, data, nullptr); in HWTEST_F() 144 result = Ed25519Verify(keyPair->pubKey, data, signContent); in HWTEST_F()
|
/drivers/peripheral/user_auth/hdi_service/adaptor/inc/ |
H A D | adaptor_algorithm.h | 37 Buffer *pubKey; member 51 int32_t Ed25519Verify(const Buffer *pubKey, const Buffer *data, const Buffer *sign);
|
/drivers/peripheral/pin_auth/hdi_service/adaptor/src/ |
H A D | adaptor_algorithm.c | 42 keyPair->pubKey = CreateBufferBySize(ED25519_FIX_PUBKEY_BUFFER_SIZE); in CreateEd25519KeyPair() 43 if (keyPair->pubKey == NULL) { in CreateEd25519KeyPair() 51 DestroyBuffer(keyPair->pubKey); in CreateEd25519KeyPair() 63 if (keyPair->pubKey != NULL) { in DestroyKeyPair() 64 DestroyBuffer(keyPair->pubKey); in DestroyKeyPair() 78 if (!CheckBufferWithSize(keyPair->pubKey, ED25519_FIX_PUBKEY_BUFFER_SIZE)) { in IsEd25519KeyPairValid() 110 size_t pubKeySize = keyPair->pubKey->maxSize; in GenerateEd25519KeyPair() 111 if (EVP_PKEY_get_raw_public_key(key, keyPair->pubKey->buf, &pubKeySize) != OPENSSL_SUCCESS) { in GenerateEd25519KeyPair() 115 keyPair->pubKey->contentSize = pubKeySize; in GenerateEd25519KeyPair() 181 int32_t Ed25519Verify(const Buffer *pubKey, cons argument [all...] |
/drivers/peripheral/pin_auth/hdi_service/main/inc/ |
H A D | executor_func_common.h | 56 uint8_t pubKey[ED25519_FIX_PUBKEY_BUFFER_SIZE];
member 79 uint64_t scheduleId, Attribute **data, const Buffer *pubKey, const uint8_t *msg, uint32_t msgSize);
|
H A D | pin_auth.h | 49 int32_t GetExecutorInfo(int32_t executorRole, std::vector<uint8_t> &pubKey, uint32_t &esl,
|
/drivers/peripheral/pin_auth/hdi_service/adaptor/inc/ |
H A D | adaptor_algorithm.h | 40 Buffer *pubKey; member 54 int32_t Ed25519Verify(const Buffer *pubKey, const Buffer *data, const Buffer *sign);
|
/drivers/peripheral/pin_auth/test/unittest/pin_auth/service/src/ |
H A D | all_in_one_impl_test.cpp | 117 std::vector<uint8_t> frameworkPublicKey(keyPair->pubKey->buf, keyPair->pubKey->buf + keyPair->pubKey->contentSize); in HWTEST_F()
|
/drivers/peripheral/user_auth/test/unittest/base_test/src/ |
H A D | adaptor_algorithm_test.cpp | 57 keyPair2.pubKey = nullptr; in HWTEST_F() 66 keyPair3.pubKey = CopyBuffer(data); in HWTEST_F() 67 EXPECT_NE(keyPair3.pubKey, nullptr); in HWTEST_F() 70 DestoryBuffer(keyPair3.pubKey); in HWTEST_F() 134 result = Ed25519Verify(keyPair->pubKey, nullptr, signContent); in HWTEST_F() 137 result = Ed25519Verify(keyPair->pubKey, data, nullptr); in HWTEST_F() 143 result = Ed25519Verify(keyPair->pubKey, data, signContent); in HWTEST_F()
|
/drivers/peripheral/pin_auth/test/unittest/pin_auth/main/src/ |
H A D | pin_auth_test.cpp | 171 std::vector<uint8_t> pubKey; in HWTEST_F() local 174 int32_t result = pinAuth->GetExecutorInfo(HDI::PinAuth::HdiExecutorRole::SCHEDULER, pubKey, esl, acl); in HWTEST_F() 257 std::vector<uint8_t> frameworkPublicKey(keyPair->pubKey->buf, keyPair->pubKey->buf + keyPair->pubKey->contentSize); in HWTEST_F() 290 std::vector<uint8_t> pubKey; in HWTEST_F() local 293 result = pinAuth->GetExecutorInfo(HDI::PinAuth::HdiExecutorRole::ALL_IN_ONE, pubKey, esl, acl); in HWTEST_F()
|
/drivers/peripheral/user_auth/hdi_service/key_mgr/src/ |
H A D | ed25519_key.c | 53 return g_keyPair->pubKey; in GetPubKey()
|
/drivers/peripheral/user_auth/hdi_service/coauth/inc/ |
H A D | pool.h | 45 uint8_t pubKey[PUBLIC_KEY_LEN]; member
|
/drivers/peripheral/pin_auth/hdi_service/main/src/ |
H A D | all_in_one_func.c | 184 if (GetBufferData(g_keyPair->pubKey, pinExecutorInfo->pubKey, &pubKeyLen) != RESULT_SUCCESS) { in DoGetAllInOneExecutorInfo()
|
H A D | pin_auth.cpp | 279 int32_t PinAuth::GetExecutorInfo(int32_t executorRole, std::vector<uint8_t> &pubKey, uint32_t &esl, in GetExecutorInfo() argument 306 pubKey.resize(ED25519_FIX_PUBKEY_BUFFER_SIZE); in GetExecutorInfo() 307 if (memcpy_s(pubKey.data(), ED25519_FIX_PUBKEY_BUFFER_SIZE, in GetExecutorInfo() 308 pinExecutorInfo.pubKey, ED25519_FIX_PUBKEY_BUFFER_SIZE) != EOK) { in GetExecutorInfo() 309 LOG_ERROR("copy pinExecutorInfo to pubKey fail!"); in GetExecutorInfo() 316 pinExecutorInfo.pubKey, ED25519_FIX_PUBKEY_BUFFER_SIZE, 0, ED25519_FIX_PUBKEY_BUFFER_SIZE)); in GetExecutorInfo()
|
H A D | executor_func_common.c | 240 uint64_t scheduleId, Attribute **data, const Buffer *pubKey, const uint8_t *msg, uint32_t msgSize) in VerifyAndGetDataAttribute() 242 if ((data == NULL) || !IsBufferValid(pubKey) || (msg == NULL)) { in VerifyAndGetDataAttribute() 263 int32_t result = Ed25519Verify(pubKey, dataBuf, signBuf); in VerifyAndGetDataAttribute() 239 VerifyAndGetDataAttribute( uint64_t scheduleId, Attribute **data, const Buffer *pubKey, const uint8_t *msg, uint32_t msgSize) VerifyAndGetDataAttribute() argument
|
H A D | collector_func.c | 79 if (GetBufferData(g_keyPair->pubKey, pinExecutorInfo->pubKey, &pubKeyLen) != RESULT_SUCCESS) { in DoGetCollectorExecutorInfo()
|
H A D | verifier_func.c | 81 if (GetBufferData(g_keyPair->pubKey, pinExecutorInfo->pubKey, &pubKeyLen) != RESULT_SUCCESS) { in DoGetVerifierExecutorInfo()
|
/drivers/peripheral/user_auth/hdi_service/coauth/src/ |
H A D | executor_message.c | 163 publicKey = CreateBufferByData(executor->pubKey, PUBLIC_KEY_LEN); in Ed25519VerifyData() 654 Uint8Array pubKeyTlv = { resultInfo->pubKey, PUBLIC_KEY_LEN }; in GetExecutorInfoHalFromAttribute() 657 LOG_ERROR("GetAttributeUint8Array pubKey fail"); in GetExecutorInfoHalFromAttribute() 737 (memcmp(executorInfo.pubKey, infoToCheck->pubKey, PUBLIC_KEY_LEN) == 0)) { in CheckRemoteExecutorInfoInner() 1072 Uint8Array publicKeyIn = { executorInfo->pubKey, PUBLIC_KEY_LEN }; in SetExecutorInfoMsgToAttribute() 1075 LOG_ERROR("SetAttributeUint8Array for pubKey fail"); in SetExecutorInfoMsgToAttribute()
|
/drivers/peripheral/user_auth/hdi_service/service/ |
H A D | user_auth_interface_service.cpp | 448 Uint8Array publicKeyInfo = { (uint8_t *)in->executors[1 - i].pubKey, PUBLIC_KEY_LEN };
in CopyAuthScheduleInfo() 1206 if (memcpy_s(out.pubKey, PUBLIC_KEY_LEN, &in.publicKey[0], in.publicKey.size()) != EOK) {
in CopyExecutorInfo()
|