Lines Matching full:attributes

140 	psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT;  in otPlatCryptoImportKey()  local
174 psa_set_key_type(&attributes, toPsaKeyType(aKeyType)); in otPlatCryptoImportKey()
175 psa_set_key_algorithm(&attributes, toPsaAlgorithm(aKeyAlgorithm)); in otPlatCryptoImportKey()
176 psa_set_key_usage_flags(&attributes, toPsaKeyUsage(aKeyUsage)); in otPlatCryptoImportKey()
180 psa_set_key_lifetime(&attributes, PSA_KEY_LIFETIME_PERSISTENT); in otPlatCryptoImportKey()
181 psa_set_key_id(&attributes, *aKeyRef); in otPlatCryptoImportKey()
184 psa_set_key_lifetime(&attributes, PSA_KEY_LIFETIME_VOLATILE); in otPlatCryptoImportKey()
188 status = psa_import_key(&attributes, aKey, aKeyLen, aKeyRef); in otPlatCryptoImportKey()
189 psa_reset_key_attributes(&attributes); in otPlatCryptoImportKey()
211 psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT; in otPlatCryptoHasKey() local
214 status = psa_get_key_attributes(aKeyRef, &attributes); in otPlatCryptoHasKey()
215 psa_reset_key_attributes(&attributes); in otPlatCryptoHasKey()
426 psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT; in otPlatCryptoEcdsaGenerateKey() local
431 psa_set_key_usage_flags(&attributes, PSA_KEY_USAGE_EXPORT); in otPlatCryptoEcdsaGenerateKey()
432 psa_set_key_algorithm(&attributes, PSA_ALG_DETERMINISTIC_ECDSA(PSA_ALG_SHA_256)); in otPlatCryptoEcdsaGenerateKey()
433 psa_set_key_type(&attributes, PSA_KEY_TYPE_ECC_KEY_PAIR(PSA_ECC_FAMILY_SECP_R1)); in otPlatCryptoEcdsaGenerateKey()
434 psa_set_key_bits(&attributes, 256); in otPlatCryptoEcdsaGenerateKey()
436 status = psa_generate_key(&attributes, &key_id); in otPlatCryptoEcdsaGenerateKey()
449 psa_reset_key_attributes(&attributes); in otPlatCryptoEcdsaGenerateKey()
459 psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT; in otPlatCryptoEcdsaSign() local
464 psa_set_key_usage_flags(&attributes, PSA_KEY_USAGE_SIGN_HASH); in otPlatCryptoEcdsaSign()
465 psa_set_key_algorithm(&attributes, PSA_ALG_DETERMINISTIC_ECDSA(PSA_ALG_SHA_256)); in otPlatCryptoEcdsaSign()
466 psa_set_key_type(&attributes, PSA_KEY_TYPE_ECC_KEY_PAIR(PSA_ECC_FAMILY_SECP_R1)); in otPlatCryptoEcdsaSign()
467 psa_set_key_bits(&attributes, 256); in otPlatCryptoEcdsaSign()
469 status = psa_import_key(&attributes, aKeyPair->mDerBytes, aKeyPair->mDerLength, &key_id); in otPlatCryptoEcdsaSign()
482 psa_reset_key_attributes(&attributes); in otPlatCryptoEcdsaSign()
492 psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT; in otPlatCryptoEcdsaVerify() local
497 psa_set_key_usage_flags(&attributes, PSA_KEY_USAGE_VERIFY_HASH); in otPlatCryptoEcdsaVerify()
498 psa_set_key_algorithm(&attributes, PSA_ALG_DETERMINISTIC_ECDSA(PSA_ALG_SHA_256)); in otPlatCryptoEcdsaVerify()
499 psa_set_key_type(&attributes, PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECP_R1)); in otPlatCryptoEcdsaVerify()
500 psa_set_key_bits(&attributes, 256); in otPlatCryptoEcdsaVerify()
508 status = psa_import_key(&attributes, buffer, sizeof(buffer), &key_id); in otPlatCryptoEcdsaVerify()
521 psa_reset_key_attributes(&attributes); in otPlatCryptoEcdsaVerify()
584 psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT; in otPlatCryptoEcdsaGenerateAndImportKey() local
588 psa_set_key_usage_flags(&attributes, PSA_KEY_USAGE_VERIFY_HASH | PSA_KEY_USAGE_SIGN_HASH); in otPlatCryptoEcdsaGenerateAndImportKey()
589 psa_set_key_algorithm(&attributes, PSA_ALG_DETERMINISTIC_ECDSA(PSA_ALG_SHA_256)); in otPlatCryptoEcdsaGenerateAndImportKey()
590 psa_set_key_type(&attributes, PSA_KEY_TYPE_ECC_KEY_PAIR(PSA_ECC_FAMILY_SECP_R1)); in otPlatCryptoEcdsaGenerateAndImportKey()
591 psa_set_key_lifetime(&attributes, PSA_KEY_LIFETIME_PERSISTENT); in otPlatCryptoEcdsaGenerateAndImportKey()
592 psa_set_key_id(&attributes, key_id); in otPlatCryptoEcdsaGenerateAndImportKey()
593 psa_set_key_bits(&attributes, 256); in otPlatCryptoEcdsaGenerateAndImportKey()
595 status = psa_generate_key(&attributes, &key_id); in otPlatCryptoEcdsaGenerateAndImportKey()
601 psa_reset_key_attributes(&attributes); in otPlatCryptoEcdsaGenerateAndImportKey()
616 psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT; in otPlatCryptoPbkdf2GenerateKey() local
620 psa_set_key_usage_flags(&attributes, PSA_KEY_USAGE_DERIVE); in otPlatCryptoPbkdf2GenerateKey()
621 psa_set_key_lifetime(&attributes, PSA_KEY_LIFETIME_VOLATILE); in otPlatCryptoPbkdf2GenerateKey()
622 psa_set_key_algorithm(&attributes, algorithm); in otPlatCryptoPbkdf2GenerateKey()
623 psa_set_key_type(&attributes, PSA_KEY_TYPE_PASSWORD); in otPlatCryptoPbkdf2GenerateKey()
624 psa_set_key_bits(&attributes, PSA_BYTES_TO_BITS(aPasswordLen)); in otPlatCryptoPbkdf2GenerateKey()
626 status = psa_import_key(&attributes, aPassword, aPasswordLen, &key_id); in otPlatCryptoPbkdf2GenerateKey()
660 psa_reset_key_attributes(&attributes); in otPlatCryptoPbkdf2GenerateKey()