Home
last modified time | relevance | path

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

/system/keymaster/
Dsymmetric_key.cpp41 uint32_t key_size_bits; in GenerateKey() local
42 if (!key_description.GetTagValue(TAG_KEY_SIZE, &key_size_bits) || in GenerateKey()
43 !key_size_supported(key_size_bits)) in GenerateKey()
50 size_t key_data_size = key_size_bits / 8; in GenerateKey()
57 LOG_E("Error generating %d bit symmetric key", key_size_bits); in GenerateKey()
76 uint32_t key_size_bits; in ImportKey() local
77 if (!authorizations.GetTagValue(TAG_KEY_SIZE, &key_size_bits)) { in ImportKey()
79 key_size_bits = input_key_material.key_material_size * 8; in ImportKey()
80 authorizations.push_back(TAG_KEY_SIZE, key_size_bits); in ImportKey()
87 if (!key_size_supported(key_size_bits)) in ImportKey()
[all …]
Dandroid_keymaster_utils.cpp45 keymaster_error_t EcKeySizeToCurve(uint32_t key_size_bits, keymaster_ec_curve_t* curve) { in EcKeySizeToCurve() argument
46 switch (key_size_bits) { in EcKeySizeToCurve()
70 keymaster_error_t EcCurveToKeySize(keymaster_ec_curve_t curve, uint32_t* key_size_bits) { in EcCurveToKeySize() argument
76 *key_size_bits = 224; in EcCurveToKeySize()
80 *key_size_bits = 256; in EcCurveToKeySize()
84 *key_size_bits = 384; in EcCurveToKeySize()
88 *key_size_bits = 521; in EcCurveToKeySize()
Dec_key_factory.cpp46 uint32_t* key_size_bits) { in GetCurveAndSize() argument
49 if (!key_description.GetTagValue(TAG_KEY_SIZE, key_size_bits)) { in GetCurveAndSize()
53 keymaster_error_t error = EcKeySizeToCurve(*key_size_bits, curve); in GetCurveAndSize()
58 keymaster_error_t error = EcCurveToKeySize(*curve, key_size_bits); in GetCurveAndSize()
64 *key_size_bits != tag_key_size_bits) { in GetCurveAndSize()
65 LOG_E("Curve key size %d and specified key size %d don't match", key_size_bits, in GetCurveAndSize()
151 uint32_t* key_size_bits) const { in UpdateImportKeyDescription()
152 if (!updated_description || !key_size_bits) in UpdateImportKeyDescription()
172 *key_size_bits = extracted_key_size_bits; in UpdateImportKeyDescription()
173 if (!updated_description->GetTagValue(TAG_KEY_SIZE, key_size_bits)) in UpdateImportKeyDescription()
[all …]
Dhmac_key.h39 bool key_size_supported(size_t key_size_bits) const override { in key_size_supported() argument
40 return key_size_bits > 0 && key_size_bits % 8 == 00 && in key_size_supported()
41 key_size_bits <= 2048 /* Some RFC test cases require >1024-bit keys */; 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()
Dopenssl_utils.cpp25 keymaster_error_t ec_get_group_size(const EC_GROUP* group, size_t* key_size_bits) { in ec_get_group_size() argument
28 *key_size_bits = 224; in ec_get_group_size()
31 *key_size_bits = 256; in ec_get_group_size()
34 *key_size_bits = 384; in ec_get_group_size()
37 *key_size_bits = 521; in ec_get_group_size()
Dsymmetric_key.h47 virtual bool key_size_supported(size_t key_size_bits) const = 0;
Dopenssl_utils.h72 keymaster_error_t ec_get_group_size(const EC_GROUP* group, size_t* key_size_bits);
Dsoft_keymaster_context.cpp952 size_t key_size_bits; in FakeKeyAuthorizations() local
954 ec_get_group_size(EC_KEY_get0_group(ec_key.get()), &key_size_bits); in FakeKeyAuthorizations()
957 hw_enforced->push_back(TAG_KEY_SIZE, key_size_bits); in FakeKeyAuthorizations()
/system/keymaster/include/keymaster/
Dec_key_factory.h56 static EC_GROUP* ChooseGroup(size_t key_size_bits);
60 keymaster_ec_curve_t* curve, uint32_t* key_size_bits);
Dandroid_keymaster_utils.h328 keymaster_error_t EcKeySizeToCurve(uint32_t key_size_bits, keymaster_ec_curve_t* curve);
329 keymaster_error_t EcCurveToKeySize(keymaster_ec_curve_t curve, uint32_t* key_size_bits);