/system/keymaster/android_keymaster/ |
D | android_keymaster_utils.cpp | 43 keymaster_error_t EllipticKeySizeToCurve(uint32_t key_size_bits, keymaster_ec_curve_t* curve) { in EllipticKeySizeToCurve() argument 49 *curve = KM_EC_CURVE_P_224; in EllipticKeySizeToCurve() 57 *curve = KM_EC_CURVE_P_384; in EllipticKeySizeToCurve() 61 *curve = KM_EC_CURVE_P_521; in EllipticKeySizeToCurve() 68 keymaster_error_t EcKeySizeToCurve(uint32_t key_size_bits, keymaster_ec_curve_t* curve) { in EcKeySizeToCurve() argument 74 *curve = KM_EC_CURVE_P_224; in EcKeySizeToCurve() 78 *curve = KM_EC_CURVE_P_256; in EcKeySizeToCurve() 82 *curve = KM_EC_CURVE_P_384; in EcKeySizeToCurve() 86 *curve = KM_EC_CURVE_P_521; in EcKeySizeToCurve() 93 keymaster_error_t EcCurveToKeySize(keymaster_ec_curve_t curve, uint32_t* key_size_bits) { in EcCurveToKeySize() argument [all …]
|
D | remote_provisioning_utils.cpp | 49 CoseKeyCurve curve; member 55 return curve == other.curve && in operator ==() 99 auto curve = parsedPubKey->getIntValue(CoseKey::CURVE); in validateAndExtractEekPubAndId() local 100 if (!curve) { in validateAndExtractEekPubAndId() 111 KeyInfo matcher = {static_cast<CoseKeyCurve>(*curve), in validateAndExtractEekPubAndId()
|
/system/keymaster/tests/ |
D | nist_curve_key_exchange_test.cpp | 40 for (auto& curve : kEcCurves) { in TEST() local 42 AuthorizationSetBuilder().Authorization(TAG_EC_CURVE, curve)); in TEST() 44 NistCurveKeyExchange* alice_keyex = NistCurveKeyExchange::GenerateKeyExchange(curve); in TEST() 45 NistCurveKeyExchange* bob_keyex = NistCurveKeyExchange::GenerateKeyExchange(curve); in TEST() 78 for (auto& curve : kEcCurves) { in TEST() local 80 AuthorizationSetBuilder().Authorization(TAG_EC_CURVE, curve)); in TEST() 81 KeyExchange* key_exchange = NistCurveKeyExchange::GenerateKeyExchange(curve); in TEST() 96 for (auto& curve : kEcCurves) { in TEST() local 98 EC_GROUP* group = ec_get_group(curve); in TEST() 112 AuthorizationSetBuilder().Authorization(TAG_EC_CURVE, curve)); in TEST() [all …]
|
D | ecies_kem_test.cpp | 42 for (auto& curve : kEcCurves) { in TEST() local 44 .Authorization(TAG_EC_CURVE, curve) in TEST() 52 NistCurveKeyExchange* key_exchange = NistCurveKeyExchange::GenerateKeyExchange(curve); in TEST()
|
/system/keymint/common/src/crypto/ |
D | ec.rs | 108 fn try_from(curve: EcCurve) -> Result<NistCurve, Error> { in try_from() 109 match curve { in try_from() 164 curve: &EcCurve, in subject_public_key_info() 170 let nist_curve: NistCurve = (*curve).try_into()?; in subject_public_key_info() 192 curve: EcCurve, in public_cose_key() 206 let nist_curve: NistCurve = curve.try_into()?; in public_cose_key() 300 pub fn curve(&self) -> EcCurve { in curve() method 330 curve: NistCurve, in coordinates_from_pub_key() 332 let coord_len = curve.coord_len(); in coordinates_from_pub_key() 338 curve in coordinates_from_pub_key() [all …]
|
D | traits.rs | 303 curve: ec::NistCurve, in generate_nist_key() 373 let nist_curve: ec::NistCurve = ec_key.curve().try_into()?; in subject_public_key() 385 fn nist_public_key(&self, key: &ec::NistKey, curve: ec::NistCurve) -> Result<Vec<u8>, Error>; in nist_public_key()
|
/system/keymint/boringssl/src/ |
D | ec.rs | 71 curve: ec::NistCurve, in generate_nist_key() 75 nist_curve_to_group(curve)?.as_ref() in generate_nist_key() 78 let key = match curve { in generate_nist_key() 84 Ok(crypto::KeyMaterial::Ec(curve.into(), CurveType::Nist, key.into())) in generate_nist_key() 115 fn nist_public_key(&self, key: &ec::NistKey, curve: ec::NistCurve) -> Result<Vec<u8>, Error> { in nist_public_key() 116 let group = nist_curve_to_group(curve)?; in nist_public_key() 170 let curve = key.curve(); in begin_sign() localVariable 173 let curve = ec::NistCurve::try_from(curve)?; in begin_sign() localVariable 175 Ok(Box::new(BoringEcDigestSignOperation::new(key, curve, digest)?)) in begin_sign() 177 Ok(Box::new(BoringEcUndigestSignOperation::new(key, curve)?)) in begin_sign() [all …]
|
/system/keymaster/km_openssl/ |
D | ec_key_factory.cpp | 55 keymaster_ec_curve_t* curve, in GetCurveAndSize() argument 57 if (!key_description.GetTagValue(TAG_EC_CURVE, curve)) { in GetCurveAndSize() 63 keymaster_error_t error = EllipticKeySizeToCurve(*key_size_bits, curve); in GetCurveAndSize() 68 keymaster_error_t error = EcCurveToKeySize(*curve, key_size_bits); in GetCurveAndSize() 305 keymaster_ec_curve_t curve; in ImportRawKey() local 306 if (!key_description.GetTagValue(TAG_EC_CURVE, &curve) || curve != KM_EC_CURVE_CURVE_25519) { in ImportRawKey() 417 keymaster_ec_curve_t curve; in UpdateImportKeyDescription() local 418 if (!updated_description->GetTagValue(TAG_EC_CURVE, &curve)) { in UpdateImportKeyDescription() 420 } else if (curve_from_size != curve) { in UpdateImportKeyDescription() 426 keymaster_ec_curve_t curve; in UpdateImportKeyDescription() local [all …]
|
D | nist_curve_key_exchange.cpp | 38 NistCurveKeyExchange* NistCurveKeyExchange::GenerateKeyExchange(keymaster_ec_curve_t curve) { in GenerateKeyExchange() argument 40 switch (curve) { in GenerateKeyExchange() 54 LOG_E("Not a NIST curve: %d", curve); in GenerateKeyExchange()
|
D | openssl_utils.cpp | 49 EC_GROUP* ec_get_group(keymaster_ec_curve_t curve) { in ec_get_group() argument 50 switch (curve) { in ec_get_group()
|
D | attestation_record.cpp | 229 keymaster_error_t ec_key_size_to_eat_curve(uint32_t key_size_bits, int* curve) { in ec_key_size_to_eat_curve() argument 235 *curve = (int)EatEcCurve::P_224; in ec_key_size_to_eat_curve() 239 *curve = (int)EatEcCurve::P_256; in ec_key_size_to_eat_curve() 243 *curve = (int)EatEcCurve::P_384; in ec_key_size_to_eat_curve() 247 *curve = (int)EatEcCurve::P_521; in ec_key_size_to_eat_curve()
|
/system/keymint/common/src/ |
D | crypto.rs | 204 Self::Ec(curve, curve_type, key) => { in subject_public_key_info() 205 Some(key.subject_public_key_info(buf, ec, curve, curve_type)?) in subject_public_key_info() 297 let curve = <EcCurve>::from_cbor_value(a.remove(0))?; in from_cbor_value() localVariable 299 Ok(Self::Ec(curve, curve_type, OpaqueKeyMaterial(raw_key).into())) in from_cbor_value() 301 let key = match (curve, curve_type) { in from_cbor_value() 321 error!("Unexpected EC combination ({:?}, {:?})", curve, curve_type); in from_cbor_value() 325 Ok(Self::Ec(curve, curve_type, key.into())) in from_cbor_value() 359 Self::Ec(curve, curve_type, OpaqueOr::Opaque(OpaqueKeyMaterial(k))) => vec_try![ in to_cbor_value() 364 cbor::value::Value::Integer((curve as i32).into()), in to_cbor_value() 402 Self::Ec(curve, curve_type, OpaqueOr::Explicit(k)) => vec_try![ in to_cbor_value() [all …]
|
D | tag.rs | 537 let (key, curve) = match key_format { in check_ec_import_params() 549 let curve = match &key { in check_ec_import_params() localVariable 550 KeyMaterial::Ec(curve, CurveType::Nist, _) => *curve, in check_ec_import_params() 573 (key, curve) in check_ec_import_params() 589 if *specified_curve != curve { in check_ec_import_params() 594 curve in check_ec_import_params() 598 None => deduced_chars.try_push(KeyParam::EcCurve(curve))?, in check_ec_import_params() 603 let key_size = ec::curve_to_key_size(curve); in check_ec_import_params() 618 check_ec_params(curve, params, sec_level)?; in check_ec_import_params() 624 curve: EcCurve, in check_ec_params() [all …]
|
/system/media/audio_utils/include/audio_utils/ |
D | Balance.h | 49 std::function<float(float)> curve = [](float x) { return x * (x + 0.2f); }) 51 , mCurve(normalize(std::move(curve))) { } in mRamp()
|
/system/keymaster/include/keymaster/km_openssl/ |
D | nist_curve_key_exchange.h | 47 static NistCurveKeyExchange* GenerateKeyExchange(keymaster_ec_curve_t curve);
|
D | ec_key_factory.h | 76 keymaster_ec_curve_t* curve, uint32_t* key_size_bits);
|
D | openssl_utils.h | 77 EC_GROUP* ec_get_group(keymaster_ec_curve_t curve);
|
/system/keymaster/legacy_support/ |
D | keymaster1_legacy_support.cpp | 237 keymaster_ec_curve_t curve; in GenerateKey() local 238 if (key_description.GetTagValue(TAG_EC_CURVE, &curve)) { in GenerateKey() 241 keymaster_error_t error = EcCurveToKeySize(curve, &key_size_from_curve); in GenerateKey()
|
/system/keymaster/include/keymaster/ |
D | android_keymaster_utils.h | 246 keymaster_error_t EllipticKeySizeToCurve(uint32_t key_size_bits, keymaster_ec_curve_t* curve); 252 keymaster_error_t EcKeySizeToCurve(uint32_t key_size_bits, keymaster_ec_curve_t* curve); 254 keymaster_error_t EcCurveToKeySize(keymaster_ec_curve_t curve, uint32_t* key_size_bits);
|
/system/authgraph/boringssl/src/ |
D | ec.rs | 73 fn generate_key(&self, curve: iana::EllipticCurve) -> Result<(EcSignKey, EcVerifyKey), Error> { in generate_key() 74 match curve { in generate_key() 211 curve: iana::EllipticCurve, in create_nist_key_pair() 229 let pub_key = coset::CoseKeyBuilder::new_ec2_pub_key(curve, x, y).algorithm(algorithm).build(); in create_nist_key_pair()
|
/system/keymint/common/src/keyblob/ |
D | keyblob.cddl | 49 ; An explicit EC key for a NIST curve is in the form of an ASN.1 DER encoding of a 51 ; An explicit EC key for curve 25519 is the raw key bytes.
|
/system/keymint/ta/src/ |
D | keys.rs | 228 KeyMaterial::Ec(curve, _, key) => { in sign_cert_data() 229 let digest = if curve == EcCurve::Curve25519 { in sign_cert_data() 304 crypto::KeyGenInfo::NistEc(curve) => { in generate_key_material() 305 self.imp.ec.generate_nist_key(&mut *self.imp.rng, curve, params)? in generate_key_material()
|
D | rkp.rs | 168 KeyMaterial::Ec(curve, curve_type, ref key) => key.public_cose_key( in generate_ecdsa_p256_keypair() 170 curve, in generate_ecdsa_p256_keypair()
|
/system/keymaster/cppcose/ |
D | cppcose.cpp | 537 auto& curve = senderCoseKey->asMap()->get(CoseKey::CURVE); in getSenderPubKeyFromCoseEncrypt() local 538 if (!curve || !curve->asInt() || in getSenderPubKeyFromCoseEncrypt() 539 (keyType->asInt()->value() == OCTET_KEY_PAIR && curve->asInt()->value() != X25519) || in getSenderPubKeyFromCoseEncrypt() 540 (keyType->asInt()->value() == EC2 && curve->asInt()->value() != P256)) { in getSenderPubKeyFromCoseEncrypt()
|
/system/security/keystore2/src/ |
D | sw_keyblob.rs | 78 let curve = get_tag_value(&combined, Tag::EC_CURVE) in export_key() localVariable 80 match curve { in export_key() 154 fn pkcs8_wrap_nist_key(nist_key: &[u8], curve: EcCurve) -> Result<Vec<u8>> { in pkcs8_wrap_nist_key() 155 let der_alg_id = match curve { in pkcs8_wrap_nist_key()
|