Home
last modified time | relevance | path

Searched refs:key_size_bits (Results 1 – 13 of 13) sorted by relevance

/system/keymaster/android_keymaster/
Dandroid_keymaster_utils.cpp43 keymaster_error_t EcKeySizeToCurve(uint32_t key_size_bits, keymaster_ec_curve_t* curve) { in EcKeySizeToCurve() argument
44 switch (key_size_bits) { in EcKeySizeToCurve()
68 keymaster_error_t EcCurveToKeySize(keymaster_ec_curve_t curve, uint32_t* key_size_bits) { in EcCurveToKeySize() argument
74 *key_size_bits = 224; in EcCurveToKeySize()
78 *key_size_bits = 256; in EcCurveToKeySize()
82 *key_size_bits = 384; in EcCurveToKeySize()
86 *key_size_bits = 521; in EcCurveToKeySize()
/system/keymaster/include/keymaster/km_openssl/
Dtriple_des_key.h42 bool key_size_supported(size_t key_size_bits) const override { in key_size_supported() argument
43 return key_size_bits == 112 || key_size_bits == 168; in key_size_supported()
45 size_t key_size_bytes(size_t key_size_bits) const override { return key_size_bits / 7; } in key_size_bytes() argument
46 size_t key_size_bits(size_t key_size_bytes) const override { return key_size_bytes * 7; } in key_size_bits() function
Dhmac_key.h41 bool key_size_supported(size_t key_size_bits) const override { in key_size_supported() argument
42 return key_size_bits > 0 && key_size_bits % 8 == 00 && in key_size_supported()
43 key_size_bits >= kMinHmacKeyLengthBits && key_size_bits <= kMaxHmacKeyLengthBits; in key_size_supported()
Daes_key.h44 bool key_size_supported(size_t key_size_bits) const override { in key_size_supported() argument
45 return key_size_bits == 128 || key_size_bits == 192 || key_size_bits == 256; in key_size_supported()
Dsymmetric_key.h58 virtual bool key_size_supported(size_t key_size_bits) const = 0;
62 virtual size_t key_size_bytes(size_t key_size_bits) const { return key_size_bits / 8; } in key_size_bytes() argument
63 virtual size_t key_size_bits(size_t key_size_bytes) const { return key_size_bytes * 8; } in key_size_bits() function
Dec_key_factory.h64 static EC_GROUP* ChooseGroup(size_t key_size_bits);
68 keymaster_ec_curve_t* curve, uint32_t* key_size_bits);
Dopenssl_utils.h74 keymaster_error_t ec_get_group_size(const EC_GROUP* group, size_t* key_size_bits);
/system/keymaster/km_openssl/
Dsymmetric_key.cpp42 uint32_t key_size_bits; in GenerateKey() local
43 if (!key_description.GetTagValue(TAG_KEY_SIZE, &key_size_bits) || in GenerateKey()
44 !key_size_supported(key_size_bits)) in GenerateKey()
50 size_t key_data_size = key_size_bytes(key_size_bits); in GenerateKey()
56 LOG_E("Error generating %d bit symmetric key", key_size_bits); in GenerateKey()
80 key_bits = key_size_bits(input_key_material.key_material_size); in ImportKey()
89 if (key_bits != key_size_bits(input_key_material.key_material_size)) { in ImportKey()
91 key_size_bits(input_key_material.key_material_size)); in ImportKey()
Dec_key_factory.cpp51 uint32_t* key_size_bits) { in GetCurveAndSize() argument
54 if (!key_description.GetTagValue(TAG_KEY_SIZE, key_size_bits)) { in GetCurveAndSize()
58 keymaster_error_t error = EcKeySizeToCurve(*key_size_bits, curve); in GetCurveAndSize()
63 keymaster_error_t error = EcCurveToKeySize(*curve, key_size_bits); in GetCurveAndSize()
69 *key_size_bits != tag_key_size_bits) { in GetCurveAndSize()
70 LOG_E("Curve key size %d and specified key size %d don't match", key_size_bits, in GetCurveAndSize()
199 uint32_t* key_size_bits) const { in UpdateImportKeyDescription()
200 if (!updated_description || !key_size_bits) return KM_ERROR_OUTPUT_PARAMETER_NULL; in UpdateImportKeyDescription()
216 *key_size_bits = extracted_key_size_bits; in UpdateImportKeyDescription()
217 if (!updated_description->GetTagValue(TAG_KEY_SIZE, key_size_bits)) { in UpdateImportKeyDescription()
[all …]
Dopenssl_utils.cpp28 keymaster_error_t ec_get_group_size(const EC_GROUP* group, size_t* key_size_bits) { in ec_get_group_size() argument
31 *key_size_bits = 224; in ec_get_group_size()
34 *key_size_bits = 256; in ec_get_group_size()
37 *key_size_bits = 384; in ec_get_group_size()
40 *key_size_bits = 521; in ec_get_group_size()
Dattestation_record.cpp227 keymaster_error_t ec_key_size_to_eat_curve(uint32_t key_size_bits, int* curve) { in ec_key_size_to_eat_curve() argument
228 switch (key_size_bits) { in ec_key_size_to_eat_curve()
/system/keymaster/key_blob_utils/
Dsoftware_keyblobs.cpp143 size_t key_size_bits; in FakeKeyAuthorizations() local
145 ec_get_group_size(EC_KEY_get0_group(ec_key.get()), &key_size_bits); in FakeKeyAuthorizations()
147 hw_enforced->push_back(TAG_KEY_SIZE, key_size_bits); in FakeKeyAuthorizations()
/system/keymaster/include/keymaster/
Dandroid_keymaster_utils.h240 keymaster_error_t EcKeySizeToCurve(uint32_t key_size_bits, keymaster_ec_curve_t* curve);
241 keymaster_error_t EcCurveToKeySize(keymaster_ec_curve_t curve, uint32_t* key_size_bits);