From 997caf835c92758ce771ae740752fac316a16bb0 Mon Sep 17 00:00:00 2001 From: Przemyslaw Stekiel Date: Fri, 15 Oct 2021 15:21:51 +0200 Subject: [PATCH 1/9] Add test class for key generation Genertae test_suite_psa_crypto_generate_key.generated.data. Use test_suite_psa_crypto_generate_key.function as a test function. Signed-off-by: Przemyslaw Stekiel --- scripts/mbedtls_dev/test_case.py | 12 ++- tests/scripts/generate_psa_tests.py | 79 +++++++++++++++++++ ...est_suite_psa_crypto_generate_key.function | 54 +++++++++++++ 3 files changed, 142 insertions(+), 3 deletions(-) create mode 100644 tests/suites/test_suite_psa_crypto_generate_key.function diff --git a/scripts/mbedtls_dev/test_case.py b/scripts/mbedtls_dev/test_case.py index d01e1432b..11117fcdd 100644 --- a/scripts/mbedtls_dev/test_case.py +++ b/scripts/mbedtls_dev/test_case.py @@ -42,6 +42,7 @@ class TestCase: self.dependencies = [] #type: List[str] self.function = None #type: Optional[str] self.arguments = [] #type: List[str] + self.result = '' #type: str def add_comment(self, *lines: str) -> None: self.comments += lines @@ -58,6 +59,9 @@ class TestCase: def set_arguments(self, arguments: List[str]) -> None: self.arguments = arguments + def set_result(self, result: str) -> None: + self.result = result + def check_completeness(self) -> None: if self.description is None: raise MissingDescription @@ -81,9 +85,11 @@ class TestCase: out.write(self.description + '\n') if self.dependencies: out.write('depends_on:' + ':'.join(self.dependencies) + '\n') - out.write(self.function + ':' + ':'.join(self.arguments) + '\n') - - + out.write(self.function + ':' + ':'.join(self.arguments)) + if self.result: + out.write(':' + self.result + '\n') + else: + out.write('\n') def write_data_file(filename: str, test_cases: Iterable[TestCase], diff --git a/tests/scripts/generate_psa_tests.py b/tests/scripts/generate_psa_tests.py index 64c43b2e1..add8fe52e 100755 --- a/tests/scripts/generate_psa_tests.py +++ b/tests/scripts/generate_psa_tests.py @@ -255,6 +255,83 @@ class NotSupported: yield from self.test_cases_for_key_type_not_supported( kt, 0, param_descr='curve') +def test_case_for_key_generation( + key_type: str, bits: int, + dependencies: List[str], + *args: str, + result: str = '', + param_descr: str = '', +) -> test_case.TestCase: + """Return one test case exercising a key generation. + """ + hack_dependencies_not_implemented(dependencies) + tc = test_case.TestCase() + short_key_type = re.sub(r'PSA_(KEY_TYPE|ECC_FAMILY)_', r'', key_type) + tc.set_description('PSA {} {}-bit' + .format( short_key_type, bits)) + tc.set_dependencies(dependencies) + tc.set_function('generate_key') + tc.set_arguments([key_type] + list(args)) + tc.set_result(result) + + return tc + +class KeyGenerate: + """Generate positive and negative (invalid argument) test cases for key generation.""" + + def __init__(self, info: Information) -> None: + self.constructors = info.constructors + + def test_cases_for_key_type_key_generation( + self, + kt: crypto_knowledge.KeyType, + param: Optional[int] = None, + param_descr: str = '', + ) -> Iterator[test_case.TestCase]: + """Return test cases exercising key generation. + + All key types can be generated except for public keys. For public key + PSA_ERROR_INVALID_ARGUMENT status is expected. + """ + result = 'PSA_SUCCESS' + + import_dependencies = [psa_want_symbol(kt.name)] + if kt.params is not None: + import_dependencies += [psa_want_symbol(sym) + for i, sym in enumerate(kt.params)] + if kt.name.endswith('_PUBLIC_KEY'): + generate_dependencies = [] + result = 'PSA_ERROR_INVALID_ARGUMENT' + else: + generate_dependencies = import_dependencies + for bits in kt.sizes_to_test(): + yield test_case_for_key_generation( + kt.expression, bits, + finish_family_dependencies(generate_dependencies, bits), + str(bits), + result, + param_descr=param_descr + ) + + ECC_KEY_TYPES = ('PSA_KEY_TYPE_ECC_KEY_PAIR', + 'PSA_KEY_TYPE_ECC_PUBLIC_KEY') + + def test_cases_for_key_generation(self) -> Iterator[test_case.TestCase]: + """Generate test cases that exercise the generation of keys.""" + for key_type in sorted(self.constructors.key_types): + if key_type in self.ECC_KEY_TYPES: + continue + kt = crypto_knowledge.KeyType(key_type) + yield from self.test_cases_for_key_type_key_generation(kt) + for curve_family in sorted(self.constructors.ecc_curves): + for constr in self.ECC_KEY_TYPES: + kt = crypto_knowledge.KeyType(constr, [curve_family]) + yield from self.test_cases_for_key_type_key_generation( + kt, param_descr='type') + yield from self.test_cases_for_key_type_key_generation( + kt, 0, param_descr='curve') + + class StorageKey(psa_storage.Key): """Representation of a key for storage format testing.""" @@ -676,6 +753,8 @@ class TestGenerator: test_case.write_data_file(filename, test_cases) TARGETS = { + 'test_suite_psa_crypto_generate_key.generated': + lambda info: KeyGenerate(info).test_cases_for_key_generation(), 'test_suite_psa_crypto_not_supported.generated': lambda info: NotSupported(info).test_cases_for_not_supported(), 'test_suite_psa_crypto_storage_format.current': diff --git a/tests/suites/test_suite_psa_crypto_generate_key.function b/tests/suites/test_suite_psa_crypto_generate_key.function new file mode 100644 index 000000000..7404d382a --- /dev/null +++ b/tests/suites/test_suite_psa_crypto_generate_key.function @@ -0,0 +1,54 @@ +/* BEGIN_HEADER */ + +#include "psa/crypto.h" +#include "test/psa_crypto_helpers.h" + +#define INVALID_KEY_ID mbedtls_svc_key_id_make( 0, 0xfedcba98 ) + +/* END_HEADER */ + +/* BEGIN_DEPENDENCIES + * depends_on:MBEDTLS_PSA_CRYPTO_C + * END_DEPENDENCIES + */ + +/* BEGIN_CASE */ +void generate_key( int key_type, int bits, int result) +{ + psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT; + mbedtls_svc_key_id_t key_id = INVALID_KEY_ID; + + // key lifetiem, usage flags, algorithm are irrelevant for this test + psa_key_lifetime_t _key_life_time = (psa_key_lifetime_t) 0; + psa_key_usage_t _key_usage_flags = (psa_key_usage_t) 0; + psa_algorithm_t _key_algorithm = (psa_algorithm_t) 0; + psa_key_type_t _key_type = (psa_key_type_t) key_type; + size_t _key_bits = (size_t) bits; + psa_status_t _result = (psa_status_t) result; + + PSA_ASSERT( psa_crypto_init( ) ); + psa_set_key_lifetime( &attributes, _key_life_time ); + psa_set_key_usage_flags( &attributes, _key_usage_flags ); + psa_set_key_algorithm( &attributes, _key_algorithm ); + psa_set_key_type( &attributes, _key_type ); + psa_set_key_bits( &attributes, _key_bits ); + TEST_EQUAL( psa_generate_key( &attributes, &key_id ), + _result ); + + // Verify attributes of the created key on success + if (_result == PSA_SUCCESS) + { + psa_key_attributes_t key_attributes = {0}; + PSA_ASSERT( psa_get_key_attributes( key_id, &key_attributes ) ); + TEST_EQUAL( psa_get_key_lifetime( &key_attributes ), 0 ); + TEST_EQUAL( psa_get_key_usage_flags( &key_attributes ), 0 ); + TEST_EQUAL( psa_get_key_algorithm( &key_attributes ), 0 ); + TEST_EQUAL( psa_get_key_type( &key_attributes ), _key_type ); + TEST_EQUAL( psa_get_key_bits( &key_attributes ), _key_bits ); + } + +exit: + psa_destroy_key( key_id ); + PSA_DONE( ); +} +/* END_CASE */ From 32a8b848149a285091dcae3ed1215d46b6f04989 Mon Sep 17 00:00:00 2001 From: Przemyslaw Stekiel Date: Mon, 18 Oct 2021 14:58:20 +0200 Subject: [PATCH 2/9] Remove key generation when given argument is invalid from NotSupported class Signed-off-by: Przemyslaw Stekiel --- tests/scripts/generate_psa_tests.py | 42 +++---------------- ...st_suite_psa_crypto_not_supported.function | 19 --------- 2 files changed, 6 insertions(+), 55 deletions(-) diff --git a/tests/scripts/generate_psa_tests.py b/tests/scripts/generate_psa_tests.py index add8fe52e..0bca19a14 100755 --- a/tests/scripts/generate_psa_tests.py +++ b/tests/scripts/generate_psa_tests.py @@ -149,30 +149,8 @@ def test_case_for_key_type_not_supported( tc.set_arguments([key_type] + list(args)) return tc -def test_case_for_key_type_invalid_argument( - verb: str, key_type: str, bits: int, - dependencies: List[str], - *args: str, - param_descr: str = '' -) -> test_case.TestCase: - """Return one test case exercising a key creation method - for an invalid argument when key is public. - """ - hack_dependencies_not_implemented(dependencies) - tc = test_case.TestCase() - short_key_type = re.sub(r'PSA_(KEY_TYPE|ECC_FAMILY)_', r'', key_type) - adverb = 'not' if dependencies else 'never' - if param_descr: - adverb = param_descr + ' ' + adverb - tc.set_description('PSA {} {} {}-bit invalid argument' - .format(verb, short_key_type, bits)) - tc.set_function(verb + '_invalid_argument') - tc.set_dependencies(dependencies) - tc.set_arguments([key_type] + list(args)) - return tc - class NotSupported: - """Generate test cases for when something is not supported or argument is inavlid.""" + """Generate test cases for when something is not supported.""" def __init__(self, info: Information) -> None: self.constructors = info.constructors @@ -187,13 +165,11 @@ class NotSupported: param: Optional[int] = None, param_descr: str = '', ) -> Iterator[test_case.TestCase]: - """Return test cases exercising key creation when the given type is unsupported - or argument is invalid. + """Return test cases exercising key creation when the given type is unsupported. If param is present and not None, emit test cases conditioned on this parameter not being supported. If it is absent or None, emit test cases - conditioned on the base type not being supported. If key is public emit test - case for invalid argument. + conditioned on the base type not being supported. """ if kt.name in self.ALWAYS_SUPPORTED: # Don't generate test cases for key types that are always supported. @@ -221,14 +197,8 @@ class NotSupported: # supported or not depending on implementation capabilities, # only generate the test case once. continue - if kt.name.endswith('_PUBLIC_KEY'): - yield test_case_for_key_type_invalid_argument( - 'generate', kt.expression, bits, - finish_family_dependencies(generate_dependencies, bits), - str(bits), - param_descr=param_descr, - ) - else: + # Public key cannot be generated + if not kt.name.endswith('_PUBLIC_KEY'): yield test_case_for_key_type_not_supported( 'generate', kt.expression, bits, finish_family_dependencies(generate_dependencies, bits), @@ -260,7 +230,7 @@ def test_case_for_key_generation( dependencies: List[str], *args: str, result: str = '', - param_descr: str = '', + param_descr: str = '' ) -> test_case.TestCase: """Return one test case exercising a key generation. """ diff --git a/tests/suites/test_suite_psa_crypto_not_supported.function b/tests/suites/test_suite_psa_crypto_not_supported.function index 0665230d7..e3253d840 100644 --- a/tests/suites/test_suite_psa_crypto_not_supported.function +++ b/tests/suites/test_suite_psa_crypto_not_supported.function @@ -50,22 +50,3 @@ exit: PSA_DONE( ); } /* END_CASE */ - -/* BEGIN_CASE */ -void generate_invalid_argument( int key_type, int bits ) -{ - psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT; - mbedtls_svc_key_id_t key_id = INVALID_KEY_ID; - - PSA_ASSERT( psa_crypto_init( ) ); - psa_set_key_type( &attributes, key_type ); - psa_set_key_bits( &attributes, bits ); - TEST_EQUAL( psa_generate_key( &attributes, &key_id ), - PSA_ERROR_INVALID_ARGUMENT ); - TEST_ASSERT( mbedtls_svc_key_id_equal( key_id, MBEDTLS_SVC_KEY_ID_INIT ) ); - -exit: - psa_destroy_key( key_id ); - PSA_DONE( ); -} -/* END_CASE */ From c03b7c58d11dc7f841047b23c06866b45a537807 Mon Sep 17 00:00:00 2001 From: Przemyslaw Stekiel Date: Wed, 20 Oct 2021 11:59:50 +0200 Subject: [PATCH 3/9] Remove unused param and duplicated test cases Signed-off-by: Przemyslaw Stekiel --- tests/scripts/generate_psa_tests.py | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/tests/scripts/generate_psa_tests.py b/tests/scripts/generate_psa_tests.py index 0bca19a14..9bee98597 100755 --- a/tests/scripts/generate_psa_tests.py +++ b/tests/scripts/generate_psa_tests.py @@ -229,8 +229,7 @@ def test_case_for_key_generation( key_type: str, bits: int, dependencies: List[str], *args: str, - result: str = '', - param_descr: str = '' + result: str = '' ) -> test_case.TestCase: """Return one test case exercising a key generation. """ @@ -238,7 +237,7 @@ def test_case_for_key_generation( tc = test_case.TestCase() short_key_type = re.sub(r'PSA_(KEY_TYPE|ECC_FAMILY)_', r'', key_type) tc.set_description('PSA {} {}-bit' - .format( short_key_type, bits)) + .format(short_key_type, bits)) tc.set_dependencies(dependencies) tc.set_function('generate_key') tc.set_arguments([key_type] + list(args)) @@ -252,11 +251,12 @@ class KeyGenerate: def __init__(self, info: Information) -> None: self.constructors = info.constructors + ECC_KEY_TYPES = ('PSA_KEY_TYPE_ECC_KEY_PAIR', + 'PSA_KEY_TYPE_ECC_PUBLIC_KEY') + + @staticmethod def test_cases_for_key_type_key_generation( - self, - kt: crypto_knowledge.KeyType, - param: Optional[int] = None, - param_descr: str = '', + kt: crypto_knowledge.KeyType ) -> Iterator[test_case.TestCase]: """Return test cases exercising key generation. @@ -279,13 +279,9 @@ class KeyGenerate: kt.expression, bits, finish_family_dependencies(generate_dependencies, bits), str(bits), - result, - param_descr=param_descr + result ) - ECC_KEY_TYPES = ('PSA_KEY_TYPE_ECC_KEY_PAIR', - 'PSA_KEY_TYPE_ECC_PUBLIC_KEY') - def test_cases_for_key_generation(self) -> Iterator[test_case.TestCase]: """Generate test cases that exercise the generation of keys.""" for key_type in sorted(self.constructors.key_types): @@ -296,11 +292,7 @@ class KeyGenerate: for curve_family in sorted(self.constructors.ecc_curves): for constr in self.ECC_KEY_TYPES: kt = crypto_knowledge.KeyType(constr, [curve_family]) - yield from self.test_cases_for_key_type_key_generation( - kt, param_descr='type') - yield from self.test_cases_for_key_type_key_generation( - kt, 0, param_descr='curve') - + yield from self.test_cases_for_key_type_key_generation(kt) class StorageKey(psa_storage.Key): """Representation of a key for storage format testing.""" From 0810108f1208050caf3ab369001415fc251f579c Mon Sep 17 00:00:00 2001 From: Przemyslaw Stekiel Date: Fri, 22 Oct 2021 10:39:56 +0200 Subject: [PATCH 4/9] Fix issues pointed by CI Signed-off-by: Przemyslaw Stekiel --- tests/scripts/generate_psa_tests.py | 13 ++++++++++--- .../test_suite_psa_crypto_generate_key.function | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/tests/scripts/generate_psa_tests.py b/tests/scripts/generate_psa_tests.py index 9bee98597..1a35af96e 100755 --- a/tests/scripts/generate_psa_tests.py +++ b/tests/scripts/generate_psa_tests.py @@ -88,9 +88,11 @@ def read_implemented_dependencies(filename: str) -> FrozenSet[str]: return frozenset(symbol for line in open(filename) for symbol in re.findall(r'\bPSA_WANT_\w+\b', line)) -IMPLEMENTED_DEPENDENCIES = read_implemented_dependencies('include/psa/crypto_config.h') def hack_dependencies_not_implemented(dependencies: List[str]) -> None: - if not all(dep.lstrip('!') in IMPLEMENTED_DEPENDENCIES + if _implemented_dependencies is None: + _implemented_dependencies = \ + read_implemented_dependencies('include/psa/crypto_config.h') + if not all((dep.lstrip('!') in _implemented_dependencies or 'PSA_WANT' not in dep) for dep in dependencies): dependencies.append('DEPENDENCY_NOT_IMPLEMENTED_YET') @@ -254,8 +256,11 @@ class KeyGenerate: ECC_KEY_TYPES = ('PSA_KEY_TYPE_ECC_KEY_PAIR', 'PSA_KEY_TYPE_ECC_PUBLIC_KEY') - @staticmethod + RSA_KEY_TYPES = ('PSA_KEY_TYPE_RSA_KEY_PAIR', + 'PSA_KEY_TYPE_RSA_PUBLIC_KEY') + def test_cases_for_key_type_key_generation( + self, kt: crypto_knowledge.KeyType ) -> Iterator[test_case.TestCase]: """Return test cases exercising key generation. @@ -274,6 +279,8 @@ class KeyGenerate: result = 'PSA_ERROR_INVALID_ARGUMENT' else: generate_dependencies = import_dependencies + if kt.name in self.RSA_KEY_TYPES: + generate_dependencies.append("MBEDTLS_GENPRIME") for bits in kt.sizes_to_test(): yield test_case_for_key_generation( kt.expression, bits, diff --git a/tests/suites/test_suite_psa_crypto_generate_key.function b/tests/suites/test_suite_psa_crypto_generate_key.function index 7404d382a..d30c0e487 100644 --- a/tests/suites/test_suite_psa_crypto_generate_key.function +++ b/tests/suites/test_suite_psa_crypto_generate_key.function @@ -38,7 +38,7 @@ void generate_key( int key_type, int bits, int result) // Verify attributes of the created key on success if (_result == PSA_SUCCESS) { - psa_key_attributes_t key_attributes = {0}; + psa_key_attributes_t key_attributes = PSA_KEY_ATTRIBUTES_INIT; PSA_ASSERT( psa_get_key_attributes( key_id, &key_attributes ) ); TEST_EQUAL( psa_get_key_lifetime( &key_attributes ), 0 ); TEST_EQUAL( psa_get_key_usage_flags( &key_attributes ), 0 ); From 1ab3a5ca98e2f6943e0caa430c6acbcb4978369b Mon Sep 17 00:00:00 2001 From: Przemyslaw Stekiel Date: Tue, 2 Nov 2021 10:50:44 +0100 Subject: [PATCH 5/9] generate_psa_tests.py: add key generation result to test case argument list, add comments Signed-off-by: Przemyslaw Stekiel --- scripts/mbedtls_dev/test_case.py | 8 -------- tests/scripts/generate_psa_tests.py | 16 ++++++++-------- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/scripts/mbedtls_dev/test_case.py b/scripts/mbedtls_dev/test_case.py index 11117fcdd..8ec211546 100644 --- a/scripts/mbedtls_dev/test_case.py +++ b/scripts/mbedtls_dev/test_case.py @@ -42,7 +42,6 @@ class TestCase: self.dependencies = [] #type: List[str] self.function = None #type: Optional[str] self.arguments = [] #type: List[str] - self.result = '' #type: str def add_comment(self, *lines: str) -> None: self.comments += lines @@ -59,9 +58,6 @@ class TestCase: def set_arguments(self, arguments: List[str]) -> None: self.arguments = arguments - def set_result(self, result: str) -> None: - self.result = result - def check_completeness(self) -> None: if self.description is None: raise MissingDescription @@ -86,10 +82,6 @@ class TestCase: if self.dependencies: out.write('depends_on:' + ':'.join(self.dependencies) + '\n') out.write(self.function + ':' + ':'.join(self.arguments)) - if self.result: - out.write(':' + self.result + '\n') - else: - out.write('\n') def write_data_file(filename: str, test_cases: Iterable[TestCase], diff --git a/tests/scripts/generate_psa_tests.py b/tests/scripts/generate_psa_tests.py index 1a35af96e..f519f7902 100755 --- a/tests/scripts/generate_psa_tests.py +++ b/tests/scripts/generate_psa_tests.py @@ -199,7 +199,8 @@ class NotSupported: # supported or not depending on implementation capabilities, # only generate the test case once. continue - # Public key cannot be generated + # For public key we expect that key generation fails with + # INVALID_ARGUMENT. It is handled by KeyGenerate class. if not kt.name.endswith('_PUBLIC_KEY'): yield test_case_for_key_type_not_supported( 'generate', kt.expression, bits, @@ -242,8 +243,7 @@ def test_case_for_key_generation( .format(short_key_type, bits)) tc.set_dependencies(dependencies) tc.set_function('generate_key') - tc.set_arguments([key_type] + list(args)) - tc.set_result(result) + tc.set_arguments([key_type] + list(args) + [result]) return tc @@ -256,11 +256,8 @@ class KeyGenerate: ECC_KEY_TYPES = ('PSA_KEY_TYPE_ECC_KEY_PAIR', 'PSA_KEY_TYPE_ECC_PUBLIC_KEY') - RSA_KEY_TYPES = ('PSA_KEY_TYPE_RSA_KEY_PAIR', - 'PSA_KEY_TYPE_RSA_PUBLIC_KEY') - + @staticmethod def test_cases_for_key_type_key_generation( - self, kt: crypto_knowledge.KeyType ) -> Iterator[test_case.TestCase]: """Return test cases exercising key generation. @@ -275,11 +272,14 @@ class KeyGenerate: import_dependencies += [psa_want_symbol(sym) for i, sym in enumerate(kt.params)] if kt.name.endswith('_PUBLIC_KEY'): + # The library checks whether the key type is a public key generically, + # before it reaches a point where it needs support for the specific key + # type, so it returns INVALID_ARGUMENT for unsupported public key types. generate_dependencies = [] result = 'PSA_ERROR_INVALID_ARGUMENT' else: generate_dependencies = import_dependencies - if kt.name in self.RSA_KEY_TYPES: + if kt.name == 'PSA_KEY_TYPE_RSA_KEY_PAIR': generate_dependencies.append("MBEDTLS_GENPRIME") for bits in kt.sizes_to_test(): yield test_case_for_key_generation( From 98e38678c23d19cab89130f669a15569e7626753 Mon Sep 17 00:00:00 2001 From: Przemyslaw Stekiel Date: Tue, 2 Nov 2021 10:52:53 +0100 Subject: [PATCH 6/9] Adapt generate_key() test code to mbedTLS standards Signed-off-by: Przemyslaw Stekiel --- ...est_suite_psa_crypto_generate_key.function | 37 ++++++++----------- 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/tests/suites/test_suite_psa_crypto_generate_key.function b/tests/suites/test_suite_psa_crypto_generate_key.function index d30c0e487..dbe9a0ecf 100644 --- a/tests/suites/test_suite_psa_crypto_generate_key.function +++ b/tests/suites/test_suite_psa_crypto_generate_key.function @@ -13,41 +13,36 @@ */ /* BEGIN_CASE */ -void generate_key( int key_type, int bits, int result) +void generate_key( int key_type_arg, int bits_arg, int expected_status_arg) { psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT; mbedtls_svc_key_id_t key_id = INVALID_KEY_ID; // key lifetiem, usage flags, algorithm are irrelevant for this test - psa_key_lifetime_t _key_life_time = (psa_key_lifetime_t) 0; - psa_key_usage_t _key_usage_flags = (psa_key_usage_t) 0; - psa_algorithm_t _key_algorithm = (psa_algorithm_t) 0; - psa_key_type_t _key_type = (psa_key_type_t) key_type; - size_t _key_bits = (size_t) bits; - psa_status_t _result = (psa_status_t) result; + psa_key_type_t key_type = key_type_arg; + size_t bits = bits_arg; + psa_status_t expected_status = expected_status_arg; PSA_ASSERT( psa_crypto_init( ) ); - psa_set_key_lifetime( &attributes, _key_life_time ); - psa_set_key_usage_flags( &attributes, _key_usage_flags ); - psa_set_key_algorithm( &attributes, _key_algorithm ); - psa_set_key_type( &attributes, _key_type ); - psa_set_key_bits( &attributes, _key_bits ); + psa_set_key_type( &attributes, key_type ); + psa_set_key_bits( &attributes, bits ); TEST_EQUAL( psa_generate_key( &attributes, &key_id ), - _result ); + expected_status ); // Verify attributes of the created key on success - if (_result == PSA_SUCCESS) + if ( expected_status == PSA_SUCCESS ) { - psa_key_attributes_t key_attributes = PSA_KEY_ATTRIBUTES_INIT; - PSA_ASSERT( psa_get_key_attributes( key_id, &key_attributes ) ); - TEST_EQUAL( psa_get_key_lifetime( &key_attributes ), 0 ); - TEST_EQUAL( psa_get_key_usage_flags( &key_attributes ), 0 ); - TEST_EQUAL( psa_get_key_algorithm( &key_attributes ), 0 ); - TEST_EQUAL( psa_get_key_type( &key_attributes ), _key_type ); - TEST_EQUAL( psa_get_key_bits( &key_attributes ), _key_bits ); + psa_reset_key_attributes(&attributes); + PSA_ASSERT( psa_get_key_attributes( key_id, &attributes ) ); + TEST_EQUAL( psa_get_key_lifetime( &attributes ), PSA_KEY_LIFETIME_VOLATILE ); + TEST_EQUAL( psa_get_key_usage_flags( &attributes ), 0 ); + TEST_EQUAL( psa_get_key_algorithm( &attributes ), 0 ); + TEST_EQUAL( psa_get_key_type( &attributes ), key_type ); + TEST_EQUAL( psa_get_key_bits( &attributes ), bits ); } exit: + psa_reset_key_attributes(&attributes); psa_destroy_key( key_id ); PSA_DONE( ); } From 292759319f11beaeb4dc2e7a87bd98b24d41b463 Mon Sep 17 00:00:00 2001 From: Przemyslaw Stekiel Date: Tue, 9 Nov 2021 12:06:26 +0100 Subject: [PATCH 7/9] Fix rebase issue in generate_psa_tests.py Signed-off-by: Przemyslaw Stekiel --- tests/scripts/generate_psa_tests.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/scripts/generate_psa_tests.py b/tests/scripts/generate_psa_tests.py index f519f7902..af25feb63 100755 --- a/tests/scripts/generate_psa_tests.py +++ b/tests/scripts/generate_psa_tests.py @@ -88,7 +88,9 @@ def read_implemented_dependencies(filename: str) -> FrozenSet[str]: return frozenset(symbol for line in open(filename) for symbol in re.findall(r'\bPSA_WANT_\w+\b', line)) +_implemented_dependencies = None #type: Optional[FrozenSet[str]] #pylint: disable=invalid-name def hack_dependencies_not_implemented(dependencies: List[str]) -> None: + global _implemented_dependencies #pylint: disable=global-statement,invalid-name if _implemented_dependencies is None: _implemented_dependencies = \ read_implemented_dependencies('include/psa/crypto_config.h') From e2b50957dfd69f4f1dfe7664c9fc67869d4663ca Mon Sep 17 00:00:00 2001 From: Przemyslaw Stekiel Date: Tue, 9 Nov 2021 14:40:12 +0100 Subject: [PATCH 8/9] test_case.py: add new line between test cases Signed-off-by: Przemyslaw Stekiel --- scripts/mbedtls_dev/test_case.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/mbedtls_dev/test_case.py b/scripts/mbedtls_dev/test_case.py index 8ec211546..6a46e4209 100644 --- a/scripts/mbedtls_dev/test_case.py +++ b/scripts/mbedtls_dev/test_case.py @@ -81,7 +81,7 @@ class TestCase: out.write(self.description + '\n') if self.dependencies: out.write('depends_on:' + ':'.join(self.dependencies) + '\n') - out.write(self.function + ':' + ':'.join(self.arguments)) + out.write(self.function + ':' + ':'.join(self.arguments) + '\n') def write_data_file(filename: str, test_cases: Iterable[TestCase], From 59299965696f5b166dcc4f5fe6cc00437ed37170 Mon Sep 17 00:00:00 2001 From: Przemyslaw Stekiel Date: Tue, 9 Nov 2021 14:41:28 +0100 Subject: [PATCH 9/9] Add generated test data Signed-off-by: Przemyslaw Stekiel --- ...ite_psa_crypto_generate_key.generated.data | 342 ++++++++++++++++++ ...te_psa_crypto_not_supported.generated.data | 99 ----- 2 files changed, 342 insertions(+), 99 deletions(-) create mode 100644 tests/suites/test_suite_psa_crypto_generate_key.generated.data diff --git a/tests/suites/test_suite_psa_crypto_generate_key.generated.data b/tests/suites/test_suite_psa_crypto_generate_key.generated.data new file mode 100644 index 000000000..7199c68cf --- /dev/null +++ b/tests/suites/test_suite_psa_crypto_generate_key.generated.data @@ -0,0 +1,342 @@ +# Automatically generated by generate_psa_tests.py. Do not edit! + +PSA AES 128-bit +depends_on:PSA_WANT_KEY_TYPE_AES +generate_key:PSA_KEY_TYPE_AES:128:PSA_SUCCESS: + +PSA AES 192-bit +depends_on:PSA_WANT_KEY_TYPE_AES +generate_key:PSA_KEY_TYPE_AES:192:PSA_SUCCESS: + +PSA AES 256-bit +depends_on:PSA_WANT_KEY_TYPE_AES +generate_key:PSA_KEY_TYPE_AES:256:PSA_SUCCESS: + +PSA ARC4 8-bit +depends_on:PSA_WANT_KEY_TYPE_ARC4 +generate_key:PSA_KEY_TYPE_ARC4:8:PSA_SUCCESS: + +PSA ARC4 128-bit +depends_on:PSA_WANT_KEY_TYPE_ARC4 +generate_key:PSA_KEY_TYPE_ARC4:128:PSA_SUCCESS: + +PSA ARC4 2048-bit +depends_on:PSA_WANT_KEY_TYPE_ARC4 +generate_key:PSA_KEY_TYPE_ARC4:2048:PSA_SUCCESS: + +PSA ARIA 128-bit +depends_on:PSA_WANT_KEY_TYPE_ARIA +generate_key:PSA_KEY_TYPE_ARIA:128:PSA_SUCCESS: + +PSA ARIA 192-bit +depends_on:PSA_WANT_KEY_TYPE_ARIA +generate_key:PSA_KEY_TYPE_ARIA:192:PSA_SUCCESS: + +PSA ARIA 256-bit +depends_on:PSA_WANT_KEY_TYPE_ARIA +generate_key:PSA_KEY_TYPE_ARIA:256:PSA_SUCCESS: + +PSA CAMELLIA 128-bit +depends_on:PSA_WANT_KEY_TYPE_CAMELLIA +generate_key:PSA_KEY_TYPE_CAMELLIA:128:PSA_SUCCESS: + +PSA CAMELLIA 192-bit +depends_on:PSA_WANT_KEY_TYPE_CAMELLIA +generate_key:PSA_KEY_TYPE_CAMELLIA:192:PSA_SUCCESS: + +PSA CAMELLIA 256-bit +depends_on:PSA_WANT_KEY_TYPE_CAMELLIA +generate_key:PSA_KEY_TYPE_CAMELLIA:256:PSA_SUCCESS: + +PSA CHACHA20 256-bit +depends_on:PSA_WANT_KEY_TYPE_CHACHA20 +generate_key:PSA_KEY_TYPE_CHACHA20:256:PSA_SUCCESS: + +PSA DERIVE 120-bit +depends_on:PSA_WANT_KEY_TYPE_DERIVE +generate_key:PSA_KEY_TYPE_DERIVE:120:PSA_SUCCESS: + +PSA DERIVE 128-bit +depends_on:PSA_WANT_KEY_TYPE_DERIVE +generate_key:PSA_KEY_TYPE_DERIVE:128:PSA_SUCCESS: + +PSA DES 64-bit +depends_on:PSA_WANT_KEY_TYPE_DES +generate_key:PSA_KEY_TYPE_DES:64:PSA_SUCCESS: + +PSA DES 128-bit +depends_on:PSA_WANT_KEY_TYPE_DES +generate_key:PSA_KEY_TYPE_DES:128:PSA_SUCCESS: + +PSA DES 192-bit +depends_on:PSA_WANT_KEY_TYPE_DES +generate_key:PSA_KEY_TYPE_DES:192:PSA_SUCCESS: + +PSA HMAC 128-bit +depends_on:PSA_WANT_KEY_TYPE_HMAC +generate_key:PSA_KEY_TYPE_HMAC:128:PSA_SUCCESS: + +PSA HMAC 160-bit +depends_on:PSA_WANT_KEY_TYPE_HMAC +generate_key:PSA_KEY_TYPE_HMAC:160:PSA_SUCCESS: + +PSA HMAC 224-bit +depends_on:PSA_WANT_KEY_TYPE_HMAC +generate_key:PSA_KEY_TYPE_HMAC:224:PSA_SUCCESS: + +PSA HMAC 256-bit +depends_on:PSA_WANT_KEY_TYPE_HMAC +generate_key:PSA_KEY_TYPE_HMAC:256:PSA_SUCCESS: + +PSA HMAC 384-bit +depends_on:PSA_WANT_KEY_TYPE_HMAC +generate_key:PSA_KEY_TYPE_HMAC:384:PSA_SUCCESS: + +PSA HMAC 512-bit +depends_on:PSA_WANT_KEY_TYPE_HMAC +generate_key:PSA_KEY_TYPE_HMAC:512:PSA_SUCCESS: + +PSA RAW_DATA 8-bit +depends_on:PSA_WANT_KEY_TYPE_RAW_DATA +generate_key:PSA_KEY_TYPE_RAW_DATA:8:PSA_SUCCESS: + +PSA RAW_DATA 40-bit +depends_on:PSA_WANT_KEY_TYPE_RAW_DATA +generate_key:PSA_KEY_TYPE_RAW_DATA:40:PSA_SUCCESS: + +PSA RAW_DATA 128-bit +depends_on:PSA_WANT_KEY_TYPE_RAW_DATA +generate_key:PSA_KEY_TYPE_RAW_DATA:128:PSA_SUCCESS: + +PSA RSA_KEY_PAIR 1024-bit +depends_on:PSA_WANT_KEY_TYPE_RSA_KEY_PAIR:MBEDTLS_GENPRIME +generate_key:PSA_KEY_TYPE_RSA_KEY_PAIR:1024:PSA_SUCCESS: + +PSA RSA_KEY_PAIR 1536-bit +depends_on:PSA_WANT_KEY_TYPE_RSA_KEY_PAIR:MBEDTLS_GENPRIME +generate_key:PSA_KEY_TYPE_RSA_KEY_PAIR:1536:PSA_SUCCESS: + +PSA RSA_PUBLIC_KEY 1024-bit +generate_key:PSA_KEY_TYPE_RSA_PUBLIC_KEY:1024:PSA_ERROR_INVALID_ARGUMENT: + +PSA RSA_PUBLIC_KEY 1536-bit +generate_key:PSA_KEY_TYPE_RSA_PUBLIC_KEY:1536:PSA_ERROR_INVALID_ARGUMENT: + +PSA ECC_KEY_PAIR(BRAINPOOL_P_R1) 160-bit +depends_on:PSA_WANT_KEY_TYPE_ECC_KEY_PAIR:PSA_WANT_ECC_BRAINPOOL_P_R1_160:DEPENDENCY_NOT_IMPLEMENTED_YET +generate_key:PSA_KEY_TYPE_ECC_KEY_PAIR(PSA_ECC_FAMILY_BRAINPOOL_P_R1):160:PSA_SUCCESS: + +PSA ECC_KEY_PAIR(BRAINPOOL_P_R1) 192-bit +depends_on:PSA_WANT_KEY_TYPE_ECC_KEY_PAIR:PSA_WANT_ECC_BRAINPOOL_P_R1_192:DEPENDENCY_NOT_IMPLEMENTED_YET +generate_key:PSA_KEY_TYPE_ECC_KEY_PAIR(PSA_ECC_FAMILY_BRAINPOOL_P_R1):192:PSA_SUCCESS: + +PSA ECC_KEY_PAIR(BRAINPOOL_P_R1) 224-bit +depends_on:PSA_WANT_KEY_TYPE_ECC_KEY_PAIR:PSA_WANT_ECC_BRAINPOOL_P_R1_224:DEPENDENCY_NOT_IMPLEMENTED_YET +generate_key:PSA_KEY_TYPE_ECC_KEY_PAIR(PSA_ECC_FAMILY_BRAINPOOL_P_R1):224:PSA_SUCCESS: + +PSA ECC_KEY_PAIR(BRAINPOOL_P_R1) 256-bit +depends_on:PSA_WANT_KEY_TYPE_ECC_KEY_PAIR:PSA_WANT_ECC_BRAINPOOL_P_R1_256 +generate_key:PSA_KEY_TYPE_ECC_KEY_PAIR(PSA_ECC_FAMILY_BRAINPOOL_P_R1):256:PSA_SUCCESS: + +PSA ECC_KEY_PAIR(BRAINPOOL_P_R1) 320-bit +depends_on:PSA_WANT_KEY_TYPE_ECC_KEY_PAIR:PSA_WANT_ECC_BRAINPOOL_P_R1_320:DEPENDENCY_NOT_IMPLEMENTED_YET +generate_key:PSA_KEY_TYPE_ECC_KEY_PAIR(PSA_ECC_FAMILY_BRAINPOOL_P_R1):320:PSA_SUCCESS: + +PSA ECC_KEY_PAIR(BRAINPOOL_P_R1) 384-bit +depends_on:PSA_WANT_KEY_TYPE_ECC_KEY_PAIR:PSA_WANT_ECC_BRAINPOOL_P_R1_384 +generate_key:PSA_KEY_TYPE_ECC_KEY_PAIR(PSA_ECC_FAMILY_BRAINPOOL_P_R1):384:PSA_SUCCESS: + +PSA ECC_KEY_PAIR(BRAINPOOL_P_R1) 512-bit +depends_on:PSA_WANT_KEY_TYPE_ECC_KEY_PAIR:PSA_WANT_ECC_BRAINPOOL_P_R1_512 +generate_key:PSA_KEY_TYPE_ECC_KEY_PAIR(PSA_ECC_FAMILY_BRAINPOOL_P_R1):512:PSA_SUCCESS: + +PSA ECC_PUBLIC_KEY(BRAINPOOL_P_R1) 160-bit +generate_key:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_BRAINPOOL_P_R1):160:PSA_ERROR_INVALID_ARGUMENT: + +PSA ECC_PUBLIC_KEY(BRAINPOOL_P_R1) 192-bit +generate_key:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_BRAINPOOL_P_R1):192:PSA_ERROR_INVALID_ARGUMENT: + +PSA ECC_PUBLIC_KEY(BRAINPOOL_P_R1) 224-bit +generate_key:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_BRAINPOOL_P_R1):224:PSA_ERROR_INVALID_ARGUMENT: + +PSA ECC_PUBLIC_KEY(BRAINPOOL_P_R1) 256-bit +generate_key:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_BRAINPOOL_P_R1):256:PSA_ERROR_INVALID_ARGUMENT: + +PSA ECC_PUBLIC_KEY(BRAINPOOL_P_R1) 320-bit +generate_key:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_BRAINPOOL_P_R1):320:PSA_ERROR_INVALID_ARGUMENT: + +PSA ECC_PUBLIC_KEY(BRAINPOOL_P_R1) 384-bit +generate_key:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_BRAINPOOL_P_R1):384:PSA_ERROR_INVALID_ARGUMENT: + +PSA ECC_PUBLIC_KEY(BRAINPOOL_P_R1) 512-bit +generate_key:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_BRAINPOOL_P_R1):512:PSA_ERROR_INVALID_ARGUMENT: + +PSA ECC_KEY_PAIR(MONTGOMERY) 255-bit +depends_on:PSA_WANT_KEY_TYPE_ECC_KEY_PAIR:PSA_WANT_ECC_MONTGOMERY_255 +generate_key:PSA_KEY_TYPE_ECC_KEY_PAIR(PSA_ECC_FAMILY_MONTGOMERY):255:PSA_SUCCESS: + +PSA ECC_KEY_PAIR(MONTGOMERY) 448-bit +depends_on:PSA_WANT_KEY_TYPE_ECC_KEY_PAIR:PSA_WANT_ECC_MONTGOMERY_448 +generate_key:PSA_KEY_TYPE_ECC_KEY_PAIR(PSA_ECC_FAMILY_MONTGOMERY):448:PSA_SUCCESS: + +PSA ECC_PUBLIC_KEY(MONTGOMERY) 255-bit +generate_key:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_MONTGOMERY):255:PSA_ERROR_INVALID_ARGUMENT: + +PSA ECC_PUBLIC_KEY(MONTGOMERY) 448-bit +generate_key:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_MONTGOMERY):448:PSA_ERROR_INVALID_ARGUMENT: + +PSA ECC_KEY_PAIR(SECP_K1) 192-bit +depends_on:PSA_WANT_KEY_TYPE_ECC_KEY_PAIR:PSA_WANT_ECC_SECP_K1_192 +generate_key:PSA_KEY_TYPE_ECC_KEY_PAIR(PSA_ECC_FAMILY_SECP_K1):192:PSA_SUCCESS: + +PSA ECC_KEY_PAIR(SECP_K1) 224-bit +depends_on:PSA_WANT_KEY_TYPE_ECC_KEY_PAIR:PSA_WANT_ECC_SECP_K1_224 +generate_key:PSA_KEY_TYPE_ECC_KEY_PAIR(PSA_ECC_FAMILY_SECP_K1):224:PSA_SUCCESS: + +PSA ECC_KEY_PAIR(SECP_K1) 256-bit +depends_on:PSA_WANT_KEY_TYPE_ECC_KEY_PAIR:PSA_WANT_ECC_SECP_K1_256 +generate_key:PSA_KEY_TYPE_ECC_KEY_PAIR(PSA_ECC_FAMILY_SECP_K1):256:PSA_SUCCESS: + +PSA ECC_PUBLIC_KEY(SECP_K1) 192-bit +generate_key:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECP_K1):192:PSA_ERROR_INVALID_ARGUMENT: + +PSA ECC_PUBLIC_KEY(SECP_K1) 224-bit +generate_key:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECP_K1):224:PSA_ERROR_INVALID_ARGUMENT: + +PSA ECC_PUBLIC_KEY(SECP_K1) 256-bit +generate_key:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECP_K1):256:PSA_ERROR_INVALID_ARGUMENT: + +PSA ECC_KEY_PAIR(SECP_R1) 225-bit +depends_on:PSA_WANT_KEY_TYPE_ECC_KEY_PAIR:PSA_WANT_ECC_SECP_R1_225:DEPENDENCY_NOT_IMPLEMENTED_YET +generate_key:PSA_KEY_TYPE_ECC_KEY_PAIR(PSA_ECC_FAMILY_SECP_R1):225:PSA_SUCCESS: + +PSA ECC_KEY_PAIR(SECP_R1) 256-bit +depends_on:PSA_WANT_KEY_TYPE_ECC_KEY_PAIR:PSA_WANT_ECC_SECP_R1_256 +generate_key:PSA_KEY_TYPE_ECC_KEY_PAIR(PSA_ECC_FAMILY_SECP_R1):256:PSA_SUCCESS: + +PSA ECC_KEY_PAIR(SECP_R1) 384-bit +depends_on:PSA_WANT_KEY_TYPE_ECC_KEY_PAIR:PSA_WANT_ECC_SECP_R1_384 +generate_key:PSA_KEY_TYPE_ECC_KEY_PAIR(PSA_ECC_FAMILY_SECP_R1):384:PSA_SUCCESS: + +PSA ECC_KEY_PAIR(SECP_R1) 521-bit +depends_on:PSA_WANT_KEY_TYPE_ECC_KEY_PAIR:PSA_WANT_ECC_SECP_R1_521 +generate_key:PSA_KEY_TYPE_ECC_KEY_PAIR(PSA_ECC_FAMILY_SECP_R1):521:PSA_SUCCESS: + +PSA ECC_PUBLIC_KEY(SECP_R1) 225-bit +generate_key:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECP_R1):225:PSA_ERROR_INVALID_ARGUMENT: + +PSA ECC_PUBLIC_KEY(SECP_R1) 256-bit +generate_key:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECP_R1):256:PSA_ERROR_INVALID_ARGUMENT: + +PSA ECC_PUBLIC_KEY(SECP_R1) 384-bit +generate_key:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECP_R1):384:PSA_ERROR_INVALID_ARGUMENT: + +PSA ECC_PUBLIC_KEY(SECP_R1) 521-bit +generate_key:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECP_R1):521:PSA_ERROR_INVALID_ARGUMENT: + +PSA ECC_KEY_PAIR(SECP_R2) 160-bit +depends_on:PSA_WANT_KEY_TYPE_ECC_KEY_PAIR:PSA_WANT_ECC_SECP_R2_160:DEPENDENCY_NOT_IMPLEMENTED_YET +generate_key:PSA_KEY_TYPE_ECC_KEY_PAIR(PSA_ECC_FAMILY_SECP_R2):160:PSA_SUCCESS: + +PSA ECC_PUBLIC_KEY(SECP_R2) 160-bit +generate_key:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECP_R2):160:PSA_ERROR_INVALID_ARGUMENT: + +PSA ECC_KEY_PAIR(SECT_K1) 163-bit +depends_on:PSA_WANT_KEY_TYPE_ECC_KEY_PAIR:PSA_WANT_ECC_SECT_K1_163:DEPENDENCY_NOT_IMPLEMENTED_YET +generate_key:PSA_KEY_TYPE_ECC_KEY_PAIR(PSA_ECC_FAMILY_SECT_K1):163:PSA_SUCCESS: + +PSA ECC_KEY_PAIR(SECT_K1) 233-bit +depends_on:PSA_WANT_KEY_TYPE_ECC_KEY_PAIR:PSA_WANT_ECC_SECT_K1_233:DEPENDENCY_NOT_IMPLEMENTED_YET +generate_key:PSA_KEY_TYPE_ECC_KEY_PAIR(PSA_ECC_FAMILY_SECT_K1):233:PSA_SUCCESS: + +PSA ECC_KEY_PAIR(SECT_K1) 239-bit +depends_on:PSA_WANT_KEY_TYPE_ECC_KEY_PAIR:PSA_WANT_ECC_SECT_K1_239:DEPENDENCY_NOT_IMPLEMENTED_YET +generate_key:PSA_KEY_TYPE_ECC_KEY_PAIR(PSA_ECC_FAMILY_SECT_K1):239:PSA_SUCCESS: + +PSA ECC_KEY_PAIR(SECT_K1) 283-bit +depends_on:PSA_WANT_KEY_TYPE_ECC_KEY_PAIR:PSA_WANT_ECC_SECT_K1_283:DEPENDENCY_NOT_IMPLEMENTED_YET +generate_key:PSA_KEY_TYPE_ECC_KEY_PAIR(PSA_ECC_FAMILY_SECT_K1):283:PSA_SUCCESS: + +PSA ECC_KEY_PAIR(SECT_K1) 409-bit +depends_on:PSA_WANT_KEY_TYPE_ECC_KEY_PAIR:PSA_WANT_ECC_SECT_K1_409:DEPENDENCY_NOT_IMPLEMENTED_YET +generate_key:PSA_KEY_TYPE_ECC_KEY_PAIR(PSA_ECC_FAMILY_SECT_K1):409:PSA_SUCCESS: + +PSA ECC_KEY_PAIR(SECT_K1) 571-bit +depends_on:PSA_WANT_KEY_TYPE_ECC_KEY_PAIR:PSA_WANT_ECC_SECT_K1_571:DEPENDENCY_NOT_IMPLEMENTED_YET +generate_key:PSA_KEY_TYPE_ECC_KEY_PAIR(PSA_ECC_FAMILY_SECT_K1):571:PSA_SUCCESS: + +PSA ECC_PUBLIC_KEY(SECT_K1) 163-bit +generate_key:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECT_K1):163:PSA_ERROR_INVALID_ARGUMENT: + +PSA ECC_PUBLIC_KEY(SECT_K1) 233-bit +generate_key:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECT_K1):233:PSA_ERROR_INVALID_ARGUMENT: + +PSA ECC_PUBLIC_KEY(SECT_K1) 239-bit +generate_key:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECT_K1):239:PSA_ERROR_INVALID_ARGUMENT: + +PSA ECC_PUBLIC_KEY(SECT_K1) 283-bit +generate_key:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECT_K1):283:PSA_ERROR_INVALID_ARGUMENT: + +PSA ECC_PUBLIC_KEY(SECT_K1) 409-bit +generate_key:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECT_K1):409:PSA_ERROR_INVALID_ARGUMENT: + +PSA ECC_PUBLIC_KEY(SECT_K1) 571-bit +generate_key:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECT_K1):571:PSA_ERROR_INVALID_ARGUMENT: + +PSA ECC_KEY_PAIR(SECT_R1) 163-bit +depends_on:PSA_WANT_KEY_TYPE_ECC_KEY_PAIR:PSA_WANT_ECC_SECT_R1_163:DEPENDENCY_NOT_IMPLEMENTED_YET +generate_key:PSA_KEY_TYPE_ECC_KEY_PAIR(PSA_ECC_FAMILY_SECT_R1):163:PSA_SUCCESS: + +PSA ECC_KEY_PAIR(SECT_R1) 233-bit +depends_on:PSA_WANT_KEY_TYPE_ECC_KEY_PAIR:PSA_WANT_ECC_SECT_R1_233:DEPENDENCY_NOT_IMPLEMENTED_YET +generate_key:PSA_KEY_TYPE_ECC_KEY_PAIR(PSA_ECC_FAMILY_SECT_R1):233:PSA_SUCCESS: + +PSA ECC_KEY_PAIR(SECT_R1) 283-bit +depends_on:PSA_WANT_KEY_TYPE_ECC_KEY_PAIR:PSA_WANT_ECC_SECT_R1_283:DEPENDENCY_NOT_IMPLEMENTED_YET +generate_key:PSA_KEY_TYPE_ECC_KEY_PAIR(PSA_ECC_FAMILY_SECT_R1):283:PSA_SUCCESS: + +PSA ECC_KEY_PAIR(SECT_R1) 409-bit +depends_on:PSA_WANT_KEY_TYPE_ECC_KEY_PAIR:PSA_WANT_ECC_SECT_R1_409:DEPENDENCY_NOT_IMPLEMENTED_YET +generate_key:PSA_KEY_TYPE_ECC_KEY_PAIR(PSA_ECC_FAMILY_SECT_R1):409:PSA_SUCCESS: + +PSA ECC_KEY_PAIR(SECT_R1) 571-bit +depends_on:PSA_WANT_KEY_TYPE_ECC_KEY_PAIR:PSA_WANT_ECC_SECT_R1_571:DEPENDENCY_NOT_IMPLEMENTED_YET +generate_key:PSA_KEY_TYPE_ECC_KEY_PAIR(PSA_ECC_FAMILY_SECT_R1):571:PSA_SUCCESS: + +PSA ECC_PUBLIC_KEY(SECT_R1) 163-bit +generate_key:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECT_R1):163:PSA_ERROR_INVALID_ARGUMENT: + +PSA ECC_PUBLIC_KEY(SECT_R1) 233-bit +generate_key:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECT_R1):233:PSA_ERROR_INVALID_ARGUMENT: + +PSA ECC_PUBLIC_KEY(SECT_R1) 283-bit +generate_key:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECT_R1):283:PSA_ERROR_INVALID_ARGUMENT: + +PSA ECC_PUBLIC_KEY(SECT_R1) 409-bit +generate_key:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECT_R1):409:PSA_ERROR_INVALID_ARGUMENT: + +PSA ECC_PUBLIC_KEY(SECT_R1) 571-bit +generate_key:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECT_R1):571:PSA_ERROR_INVALID_ARGUMENT: + +PSA ECC_KEY_PAIR(SECT_R2) 163-bit +depends_on:PSA_WANT_KEY_TYPE_ECC_KEY_PAIR:PSA_WANT_ECC_SECT_R2_163:DEPENDENCY_NOT_IMPLEMENTED_YET +generate_key:PSA_KEY_TYPE_ECC_KEY_PAIR(PSA_ECC_FAMILY_SECT_R2):163:PSA_SUCCESS: + +PSA ECC_PUBLIC_KEY(SECT_R2) 163-bit +generate_key:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECT_R2):163:PSA_ERROR_INVALID_ARGUMENT: + +PSA ECC_KEY_PAIR(TWISTED_EDWARDS) 255-bit +depends_on:PSA_WANT_KEY_TYPE_ECC_KEY_PAIR:PSA_WANT_ECC_TWISTED_EDWARDS_255:DEPENDENCY_NOT_IMPLEMENTED_YET +generate_key:PSA_KEY_TYPE_ECC_KEY_PAIR(PSA_ECC_FAMILY_TWISTED_EDWARDS):255:PSA_SUCCESS: + +PSA ECC_KEY_PAIR(TWISTED_EDWARDS) 448-bit +depends_on:PSA_WANT_KEY_TYPE_ECC_KEY_PAIR:PSA_WANT_ECC_TWISTED_EDWARDS_448:DEPENDENCY_NOT_IMPLEMENTED_YET +generate_key:PSA_KEY_TYPE_ECC_KEY_PAIR(PSA_ECC_FAMILY_TWISTED_EDWARDS):448:PSA_SUCCESS: + +PSA ECC_PUBLIC_KEY(TWISTED_EDWARDS) 255-bit +generate_key:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_TWISTED_EDWARDS):255:PSA_ERROR_INVALID_ARGUMENT: + +PSA ECC_PUBLIC_KEY(TWISTED_EDWARDS) 448-bit +generate_key:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_TWISTED_EDWARDS):448:PSA_ERROR_INVALID_ARGUMENT: + +# End of automatically generated file. diff --git a/tests/suites/test_suite_psa_crypto_not_supported.generated.data b/tests/suites/test_suite_psa_crypto_not_supported.generated.data index 321cc349c..b5c8a528f 100644 --- a/tests/suites/test_suite_psa_crypto_not_supported.generated.data +++ b/tests/suites/test_suite_psa_crypto_not_supported.generated.data @@ -196,16 +196,10 @@ PSA import RSA_PUBLIC_KEY 1024-bit not supported depends_on:!PSA_WANT_KEY_TYPE_RSA_PUBLIC_KEY import_not_supported:PSA_KEY_TYPE_RSA_PUBLIC_KEY:"30818902818100af057d396ee84fb75fdbb5c2b13c7fe5a654aa8aa2470b541ee1feb0b12d25c79711531249e1129628042dbbb6c120d1443524ef4c0e6e1d8956eeb2077af12349ddeee54483bc06c2c61948cd02b202e796aebd94d3a7cbf859c2c1819c324cb82b9cd34ede263a2abffe4733f077869e8660f7d6834da53d690ef7985f6bc30203010001" -PSA generate RSA_PUBLIC_KEY 1024-bit invalid argument -generate_invalid_argument:PSA_KEY_TYPE_RSA_PUBLIC_KEY:1024 - PSA import RSA_PUBLIC_KEY 1536-bit not supported depends_on:!PSA_WANT_KEY_TYPE_RSA_PUBLIC_KEY import_not_supported:PSA_KEY_TYPE_RSA_PUBLIC_KEY:"3081c90281c100c870feb6ca6b1d2bd9f2dd99e20f1fe2d7e5192de662229dbe162bd1ba66336a7182903ca0b72796cd441c83d24bcdc3e9a2f5e4399c8a043f1c3ddf04754a66d4cfe7b3671a37dd31a9b4c13bfe06ee90f9d94ddaa06de67a52ac863e68f756736ceb014405a6160579640f831dddccc34ad0b05070e3f9954a58d1815813e1b83bcadba814789c87f1ef2ba5d738b793ec456a67360eea1b5faf1c7cc7bf24f3b2a9d0f8958b1096e0f0c335f8888d0c63a51c3c0337214fa3f5efdf6dcc350203010001" -PSA generate RSA_PUBLIC_KEY 1536-bit invalid argument -generate_invalid_argument:PSA_KEY_TYPE_RSA_PUBLIC_KEY:1536 - PSA import ECC_KEY_PAIR(BRAINPOOL_P_R1) 160-bit type not supported depends_on:!PSA_WANT_KEY_TYPE_ECC_KEY_PAIR:PSA_WANT_ECC_BRAINPOOL_P_R1_160:DEPENDENCY_NOT_IMPLEMENTED_YET import_not_supported:PSA_KEY_TYPE_ECC_KEY_PAIR(PSA_ECC_FAMILY_BRAINPOOL_P_R1):"69502c4fdaf48d4fa617bdd24498b0406d0eeaac" @@ -322,51 +316,30 @@ PSA import ECC_PUBLIC_KEY(BRAINPOOL_P_R1) 160-bit type not supported depends_on:!PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY:PSA_WANT_ECC_BRAINPOOL_P_R1_160:DEPENDENCY_NOT_IMPLEMENTED_YET import_not_supported:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_BRAINPOOL_P_R1):"04d4b9186816358e2f9c59cf70748cb70641b22fbab65473db4b4e22a361ed7e3de7e8a8ddc4130c5c" -PSA generate ECC_PUBLIC_KEY(BRAINPOOL_P_R1) 160-bit invalid argument -generate_invalid_argument:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_BRAINPOOL_P_R1):160 - PSA import ECC_PUBLIC_KEY(BRAINPOOL_P_R1) 192-bit type not supported depends_on:!PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY:PSA_WANT_ECC_BRAINPOOL_P_R1_192:DEPENDENCY_NOT_IMPLEMENTED_YET import_not_supported:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_BRAINPOOL_P_R1):"043fdd168c179ff5363dd71dcd58de9617caad791ae0c37328be9ca0bfc79cebabf6a95d1c52df5b5f3c8b1a2441cf6c88" -PSA generate ECC_PUBLIC_KEY(BRAINPOOL_P_R1) 192-bit invalid argument -generate_invalid_argument:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_BRAINPOOL_P_R1):192 - PSA import ECC_PUBLIC_KEY(BRAINPOOL_P_R1) 224-bit type not supported depends_on:!PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY:PSA_WANT_ECC_BRAINPOOL_P_R1_224:DEPENDENCY_NOT_IMPLEMENTED_YET import_not_supported:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_BRAINPOOL_P_R1):"045fbea378fc8583b3837e3f21a457c31eaf20a54e18eb11d104b3adc47f9d1c97eb9ea4ac21740d70d88514b98bf0bc31addac1d19c4ab3cc" -PSA generate ECC_PUBLIC_KEY(BRAINPOOL_P_R1) 224-bit invalid argument -generate_invalid_argument:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_BRAINPOOL_P_R1):224 - PSA import ECC_PUBLIC_KEY(BRAINPOOL_P_R1) 256-bit type not supported depends_on:!PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY:PSA_WANT_ECC_BRAINPOOL_P_R1_256 import_not_supported:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_BRAINPOOL_P_R1):"04768c8cae4abca6306db0ed81b0c4a6215c378066ec6d616c146e13f1c7df809b96ab6911c27d8a02339f0926840e55236d3d1efbe2669d090e4c4c660fada91d" -PSA generate ECC_PUBLIC_KEY(BRAINPOOL_P_R1) 256-bit invalid argument -generate_invalid_argument:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_BRAINPOOL_P_R1):256 - PSA import ECC_PUBLIC_KEY(BRAINPOOL_P_R1) 320-bit type not supported depends_on:!PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY:PSA_WANT_ECC_BRAINPOOL_P_R1_320:DEPENDENCY_NOT_IMPLEMENTED_YET import_not_supported:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_BRAINPOOL_P_R1):"049caed8fb4742956cc2ad12a9a1c995e21759ef26a07bc2054136d3d2f28bb331a70e26c4c687275ab1f434be7871e115d2350c0c5f61d4d06d2bcdb67f5cb63fdb794e5947c87dc6849a58694e37e6cd" -PSA generate ECC_PUBLIC_KEY(BRAINPOOL_P_R1) 320-bit invalid argument -generate_invalid_argument:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_BRAINPOOL_P_R1):320 - PSA import ECC_PUBLIC_KEY(BRAINPOOL_P_R1) 384-bit type not supported depends_on:!PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY:PSA_WANT_ECC_BRAINPOOL_P_R1_384 import_not_supported:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_BRAINPOOL_P_R1):"04719f9d093a627e0d350385c661cebf00c61923566fe9006a3107af1d871bc6bb68985fd722ea32be316f8e783b7cd1957785f66cfc0cb195dd5c99a8e7abaa848553a584dfd2b48e76d445fe00dd8be59096d877d4696d23b4bc8db14724e66a" -PSA generate ECC_PUBLIC_KEY(BRAINPOOL_P_R1) 384-bit invalid argument -generate_invalid_argument:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_BRAINPOOL_P_R1):384 - PSA import ECC_PUBLIC_KEY(BRAINPOOL_P_R1) 512-bit type not supported depends_on:!PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY:PSA_WANT_ECC_BRAINPOOL_P_R1_512 import_not_supported:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_BRAINPOOL_P_R1):"0438b7ec92b61c5c6c7fbc28a4ec759d48fcd4e2e374defd5c4968a54dbef7510e517886fbfc38ea39aa529359d70a7156c35d3cbac7ce776bdb251dd64bce71234424ee7049eed072f0dbc4d79996e175d557e263763ae97095c081e73e7db2e38adc3d4c9a0487b1ede876dc1fca61c902e9a1d8722b8612928f18a24845591a" -PSA generate ECC_PUBLIC_KEY(BRAINPOOL_P_R1) 512-bit invalid argument -generate_invalid_argument:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_BRAINPOOL_P_R1):512 - PSA import ECC_PUBLIC_KEY(BRAINPOOL_P_R1) 160-bit curve not supported depends_on:PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY:!PSA_WANT_ECC_BRAINPOOL_P_R1_160:DEPENDENCY_NOT_IMPLEMENTED_YET import_not_supported:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_BRAINPOOL_P_R1):"04d4b9186816358e2f9c59cf70748cb70641b22fbab65473db4b4e22a361ed7e3de7e8a8ddc4130c5c" @@ -431,16 +404,10 @@ PSA import ECC_PUBLIC_KEY(MONTGOMERY) 255-bit type not supported depends_on:!PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY:PSA_WANT_ECC_MONTGOMERY_255 import_not_supported:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_MONTGOMERY):"8520f0098930a754748b7ddcb43ef75a0dbf3a0d26381af4eba4a98eaa9b4e6a" -PSA generate ECC_PUBLIC_KEY(MONTGOMERY) 255-bit invalid argument -generate_invalid_argument:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_MONTGOMERY):255 - PSA import ECC_PUBLIC_KEY(MONTGOMERY) 448-bit type not supported depends_on:!PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY:PSA_WANT_ECC_MONTGOMERY_448 import_not_supported:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_MONTGOMERY):"c0d3a5a2b416a573dc9909f92f134ac01323ab8f8e36804e578588ba2d09fe7c3e737f771ca112825b548a0ffded6d6a2fd09a3e77dec30e" -PSA generate ECC_PUBLIC_KEY(MONTGOMERY) 448-bit invalid argument -generate_invalid_argument:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_MONTGOMERY):448 - PSA import ECC_PUBLIC_KEY(MONTGOMERY) 255-bit curve not supported depends_on:PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY:!PSA_WANT_ECC_MONTGOMERY_255 import_not_supported:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_MONTGOMERY):"8520f0098930a754748b7ddcb43ef75a0dbf3a0d26381af4eba4a98eaa9b4e6a" @@ -501,23 +468,14 @@ PSA import ECC_PUBLIC_KEY(SECP_K1) 192-bit type not supported depends_on:!PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY:PSA_WANT_ECC_SECP_K1_192 import_not_supported:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECP_K1):"0426b7bb38da649ac2138fc050c6548b32553dab68afebc36105d325b75538c12323cb0764789ecb992671beb2b6bef2f5" -PSA generate ECC_PUBLIC_KEY(SECP_K1) 192-bit invalid argument -generate_invalid_argument:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECP_K1):192 - PSA import ECC_PUBLIC_KEY(SECP_K1) 224-bit type not supported depends_on:!PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY:PSA_WANT_ECC_SECP_K1_224 import_not_supported:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECP_K1):"042cc7335f4b76042bed44ef45959a62aa215f7a5ff0c8111b8c44ed654ee71c1918326ad485b2d599fe2a6eab096ee26d977334d2bac6d61d" -PSA generate ECC_PUBLIC_KEY(SECP_K1) 224-bit invalid argument -generate_invalid_argument:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECP_K1):224 - PSA import ECC_PUBLIC_KEY(SECP_K1) 256-bit type not supported depends_on:!PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY:PSA_WANT_ECC_SECP_K1_256 import_not_supported:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECP_K1):"045c39154579efd667adc73a81015a797d2c8682cdfbd3c3553c4a185d481cdc50e42a0e1cbc3ca29a32a645e927f54beaed14c9dbbf8279d725f5495ca924b24d" -PSA generate ECC_PUBLIC_KEY(SECP_K1) 256-bit invalid argument -generate_invalid_argument:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECP_K1):256 - PSA import ECC_PUBLIC_KEY(SECP_K1) 192-bit curve not supported depends_on:PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY:!PSA_WANT_ECC_SECP_K1_192 import_not_supported:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECP_K1):"0426b7bb38da649ac2138fc050c6548b32553dab68afebc36105d325b75538c12323cb0764789ecb992671beb2b6bef2f5" @@ -598,30 +556,18 @@ PSA import ECC_PUBLIC_KEY(SECP_R1) 225-bit type not supported depends_on:!PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY:PSA_WANT_ECC_SECP_R1_225:DEPENDENCY_NOT_IMPLEMENTED_YET import_not_supported:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECP_R1):"046f00eadaa949fee3e9e1c7fa1247eecec86a0dce46418b9bd3117b981d4bd0ae7a990de912f9d060d6cb531a42d22e394ac29e81804bf160" -PSA generate ECC_PUBLIC_KEY(SECP_R1) 225-bit invalid argument -generate_invalid_argument:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECP_R1):225 - PSA import ECC_PUBLIC_KEY(SECP_R1) 256-bit type not supported depends_on:!PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY:PSA_WANT_ECC_SECP_R1_256 import_not_supported:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECP_R1):"047772656f814b399279d5e1f1781fac6f099a3c5ca1b0e35351834b08b65e0b572590cdaf8f769361bcf34acfc11e5e074e8426bdde04be6e653945449617de45" -PSA generate ECC_PUBLIC_KEY(SECP_R1) 256-bit invalid argument -generate_invalid_argument:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECP_R1):256 - PSA import ECC_PUBLIC_KEY(SECP_R1) 384-bit type not supported depends_on:!PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY:PSA_WANT_ECC_SECP_R1_384 import_not_supported:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECP_R1):"04d9c662b50ba29ca47990450e043aeaf4f0c69b15676d112f622a71c93059af999691c5680d2b44d111579db12f4a413a2ed5c45fcfb67b5b63e00b91ebe59d09a6b1ac2c0c4282aa12317ed5914f999bc488bb132e8342cc36f2ca5e3379c747" -PSA generate ECC_PUBLIC_KEY(SECP_R1) 384-bit invalid argument -generate_invalid_argument:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECP_R1):384 - PSA import ECC_PUBLIC_KEY(SECP_R1) 521-bit type not supported depends_on:!PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY:PSA_WANT_ECC_SECP_R1_521 import_not_supported:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECP_R1):"04001de142d54f69eb038ee4b7af9d3ca07736fd9cf719eb354d69879ee7f3c136fb0fbf9f08f86be5fa128ec1a051d3e6c643e85ada8ffacf3663c260bd2c844b6f5600cee8e48a9e65d09cadd89f235dee05f3b8a646be715f1f67d5b434e0ff23a1fc07ef7740193e40eeff6f3bcdfd765aa9155033524fe4f205f5444e292c4c2f6ac1" -PSA generate ECC_PUBLIC_KEY(SECP_R1) 521-bit invalid argument -generate_invalid_argument:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECP_R1):521 - PSA import ECC_PUBLIC_KEY(SECP_R1) 225-bit curve not supported depends_on:PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY:!PSA_WANT_ECC_SECP_R1_225:DEPENDENCY_NOT_IMPLEMENTED_YET import_not_supported:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECP_R1):"046f00eadaa949fee3e9e1c7fa1247eecec86a0dce46418b9bd3117b981d4bd0ae7a990de912f9d060d6cb531a42d22e394ac29e81804bf160" @@ -658,9 +604,6 @@ PSA import ECC_PUBLIC_KEY(SECP_R2) 160-bit type not supported depends_on:!PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY:PSA_WANT_ECC_SECP_R2_160:DEPENDENCY_NOT_IMPLEMENTED_YET import_not_supported:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECP_R2):"049570d541398665adb5cfa16f5af73b3196926bbd4b876bdb80f8eab20d0f540c22f4de9c140f6d7b" -PSA generate ECC_PUBLIC_KEY(SECP_R2) 160-bit invalid argument -generate_invalid_argument:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECP_R2):160 - PSA import ECC_PUBLIC_KEY(SECP_R2) 160-bit curve not supported depends_on:PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY:!PSA_WANT_ECC_SECP_R2_160:DEPENDENCY_NOT_IMPLEMENTED_YET import_not_supported:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECP_R2):"049570d541398665adb5cfa16f5af73b3196926bbd4b876bdb80f8eab20d0f540c22f4de9c140f6d7b" @@ -765,44 +708,26 @@ PSA import ECC_PUBLIC_KEY(SECT_K1) 163-bit type not supported depends_on:!PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY:PSA_WANT_ECC_SECT_K1_163:DEPENDENCY_NOT_IMPLEMENTED_YET import_not_supported:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECT_K1):"0406f88f90b4b65950f06ce433afdb097e320f433dc2062b8a65db8fafd3c110f46bc45663fbf021ee7eb9" -PSA generate ECC_PUBLIC_KEY(SECT_K1) 163-bit invalid argument -generate_invalid_argument:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECT_K1):163 - PSA import ECC_PUBLIC_KEY(SECT_K1) 233-bit type not supported depends_on:!PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY:PSA_WANT_ECC_SECT_K1_233:DEPENDENCY_NOT_IMPLEMENTED_YET import_not_supported:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECT_K1):"0401e9d7189189f773bd8f71be2c10774ba18842434dfa9312595ea545104400f45a9d5675647513ba75b079fe66a29daac2ec86a6a5d4e75c5f290c1f" -PSA generate ECC_PUBLIC_KEY(SECT_K1) 233-bit invalid argument -generate_invalid_argument:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECT_K1):233 - PSA import ECC_PUBLIC_KEY(SECT_K1) 239-bit type not supported depends_on:!PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY:PSA_WANT_ECC_SECT_K1_239:DEPENDENCY_NOT_IMPLEMENTED_YET import_not_supported:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECT_K1):"04068d76b9f4508762c2379db9ee8b87ad8d86d9535132ffba3b5680440cfa28eb133d4232faf1c9aba96af11aefe634a551440800d5f8185105d3072d" -PSA generate ECC_PUBLIC_KEY(SECT_K1) 239-bit invalid argument -generate_invalid_argument:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECT_K1):239 - PSA import ECC_PUBLIC_KEY(SECT_K1) 283-bit type not supported depends_on:!PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY:PSA_WANT_ECC_SECT_K1_283:DEPENDENCY_NOT_IMPLEMENTED_YET import_not_supported:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECT_K1):"0405f48374debceaadb46ba385fd92048fcc5b9af1a1c90408bf94a68b9378df1cbfdfb6fb026a96bea06d8f181bf10c020adbcc88b6ecff96bdc564a9649c247cede601c4be63afc3" -PSA generate ECC_PUBLIC_KEY(SECT_K1) 283-bit invalid argument -generate_invalid_argument:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECT_K1):283 - PSA import ECC_PUBLIC_KEY(SECT_K1) 409-bit type not supported depends_on:!PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY:PSA_WANT_ECC_SECT_K1_409:DEPENDENCY_NOT_IMPLEMENTED_YET import_not_supported:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECT_K1):"04012c587f69f68b308ba6dcb238797f4e22290ca939ae806604e2b5ab4d9caef5a74a98fd87c4f88d292dd39d92e556e16c6ecc3c019a105826eef507cd9a04119f54d5d850b3720b3792d5d03410e9105610f7e4b420166ed45604a7a1f229d80975ba6be2060e8b" -PSA generate ECC_PUBLIC_KEY(SECT_K1) 409-bit invalid argument -generate_invalid_argument:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECT_K1):409 - PSA import ECC_PUBLIC_KEY(SECT_K1) 571-bit type not supported depends_on:!PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY:PSA_WANT_ECC_SECT_K1_571:DEPENDENCY_NOT_IMPLEMENTED_YET import_not_supported:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECT_K1):"04050172a7fd7adf98e4e2ed2742faa5cd12731a15fb0dbbdf75b1c3cc771a4369af6f2fa00e802735650881735759ea9c79961ded18e0daa0ac59afb1d513b5bbda9962e435f454fc020b4afe1445c2302ada07d295ec2580f8849b2dfa7f956b09b4cbe4c88d3b1c217049f75d3900d36df0fa12689256b58dd2ef784ebbeb0564600cf47a841485f8cf897a68accd5a" -PSA generate ECC_PUBLIC_KEY(SECT_K1) 571-bit invalid argument -generate_invalid_argument:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECT_K1):571 - PSA import ECC_PUBLIC_KEY(SECT_K1) 163-bit curve not supported depends_on:PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY:!PSA_WANT_ECC_SECT_K1_163:DEPENDENCY_NOT_IMPLEMENTED_YET import_not_supported:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECT_K1):"0406f88f90b4b65950f06ce433afdb097e320f433dc2062b8a65db8fafd3c110f46bc45663fbf021ee7eb9" @@ -911,37 +836,22 @@ PSA import ECC_PUBLIC_KEY(SECT_R1) 163-bit type not supported depends_on:!PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY:PSA_WANT_ECC_SECT_R1_163:DEPENDENCY_NOT_IMPLEMENTED_YET import_not_supported:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECT_R1):"0400465eeb9e7258b11e33c02266bfe834b20bcb118700772796ee4704ec67651bd447e3011959a79a04cb" -PSA generate ECC_PUBLIC_KEY(SECT_R1) 163-bit invalid argument -generate_invalid_argument:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECT_R1):163 - PSA import ECC_PUBLIC_KEY(SECT_R1) 233-bit type not supported depends_on:!PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY:PSA_WANT_ECC_SECT_R1_233:DEPENDENCY_NOT_IMPLEMENTED_YET import_not_supported:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECT_R1):"0400cd68c8af4430c92ec7a7048becfdf00a6bae8d1b4c37286f2d336f2a0e017eca3748f4ad6d435c85867aa014eea1bd6d9d005bbd8319cab629001d" -PSA generate ECC_PUBLIC_KEY(SECT_R1) 233-bit invalid argument -generate_invalid_argument:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECT_R1):233 - PSA import ECC_PUBLIC_KEY(SECT_R1) 283-bit type not supported depends_on:!PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY:PSA_WANT_ECC_SECT_R1_283:DEPENDENCY_NOT_IMPLEMENTED_YET import_not_supported:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECT_R1):"04052f9ff887254c2d1440ba9e30f13e2185ba53c373b2c410dae21cf8c167f796c08134f601cbc4c570bffbc2433082cf4d9eb5ba173ecb8caec15d66a02673f60807b2daa729b765" -PSA generate ECC_PUBLIC_KEY(SECT_R1) 283-bit invalid argument -generate_invalid_argument:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECT_R1):283 - PSA import ECC_PUBLIC_KEY(SECT_R1) 409-bit type not supported depends_on:!PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY:PSA_WANT_ECC_SECT_R1_409:DEPENDENCY_NOT_IMPLEMENTED_YET import_not_supported:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECT_R1):"0401aa25466b1d291846db365957b25431591e50d9c109fe2106e93bb369775896925b15a7bfec397406ab4fe6f6b1a13bf8fdcb9300fa5500a813228676b0a6c572ed96b0f4aec7e87832e7e20f17ca98ecdfd36f59c82bddb8665f1f357a73900e827885ec9e1f22" -PSA generate ECC_PUBLIC_KEY(SECT_R1) 409-bit invalid argument -generate_invalid_argument:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECT_R1):409 - PSA import ECC_PUBLIC_KEY(SECT_R1) 571-bit type not supported depends_on:!PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY:PSA_WANT_ECC_SECT_R1_571:DEPENDENCY_NOT_IMPLEMENTED_YET import_not_supported:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECT_R1):"040708f3403ee9948114855c17572152a08f8054d486defef5f29cbffcfb7cfd9280746a1ac5f751a6ad902ec1e0525120e9be56f03437af196fbe60ee7856e3542ab2cf87880632d80290e39b1a2bd03c6bbf6225511c567bd2ff41d2325dc58346f2b60b1feee4dc8b2af2296c2dc52b153e0556b5d24152b07f690c3fa24e4d1d19efbdeb1037833a733654d2366c74" -PSA generate ECC_PUBLIC_KEY(SECT_R1) 571-bit invalid argument -generate_invalid_argument:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECT_R1):571 - PSA import ECC_PUBLIC_KEY(SECT_R1) 163-bit curve not supported depends_on:PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY:!PSA_WANT_ECC_SECT_R1_163:DEPENDENCY_NOT_IMPLEMENTED_YET import_not_supported:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECT_R1):"0400465eeb9e7258b11e33c02266bfe834b20bcb118700772796ee4704ec67651bd447e3011959a79a04cb" @@ -982,9 +892,6 @@ PSA import ECC_PUBLIC_KEY(SECT_R2) 163-bit type not supported depends_on:!PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY:PSA_WANT_ECC_SECT_R2_163:DEPENDENCY_NOT_IMPLEMENTED_YET import_not_supported:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECT_R2):"0403692601144c32a6cfa369ae20ae5d43c1c764678c037bafe80c6fd2e42b7ced96171d9c5367fd3dca6f" -PSA generate ECC_PUBLIC_KEY(SECT_R2) 163-bit invalid argument -generate_invalid_argument:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECT_R2):163 - PSA import ECC_PUBLIC_KEY(SECT_R2) 163-bit curve not supported depends_on:PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY:!PSA_WANT_ECC_SECT_R2_163:DEPENDENCY_NOT_IMPLEMENTED_YET import_not_supported:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECT_R2):"0403692601144c32a6cfa369ae20ae5d43c1c764678c037bafe80c6fd2e42b7ced96171d9c5367fd3dca6f" @@ -1025,16 +932,10 @@ PSA import ECC_PUBLIC_KEY(TWISTED_EDWARDS) 255-bit type not supported depends_on:!PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY:PSA_WANT_ECC_TWISTED_EDWARDS_255:DEPENDENCY_NOT_IMPLEMENTED_YET import_not_supported:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_TWISTED_EDWARDS):"d75a980182b10ab7d54bfed3c964073a0ee172f3daa62325af021a68f707511a" -PSA generate ECC_PUBLIC_KEY(TWISTED_EDWARDS) 255-bit invalid argument -generate_invalid_argument:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_TWISTED_EDWARDS):255 - PSA import ECC_PUBLIC_KEY(TWISTED_EDWARDS) 448-bit type not supported depends_on:!PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY:PSA_WANT_ECC_TWISTED_EDWARDS_448:DEPENDENCY_NOT_IMPLEMENTED_YET import_not_supported:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_TWISTED_EDWARDS):"5fd7449b59b461fd2ce787ec616ad46a1da1342485a70e1f8a0ea75d80e96778edf124769b46c7061bd6783df1e50f6cd1fa1abeafe8256180" -PSA generate ECC_PUBLIC_KEY(TWISTED_EDWARDS) 448-bit invalid argument -generate_invalid_argument:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_TWISTED_EDWARDS):448 - PSA import ECC_PUBLIC_KEY(TWISTED_EDWARDS) 255-bit curve not supported depends_on:PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY:!PSA_WANT_ECC_TWISTED_EDWARDS_255:DEPENDENCY_NOT_IMPLEMENTED_YET import_not_supported:PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_TWISTED_EDWARDS):"d75a980182b10ab7d54bfed3c964073a0ee172f3daa62325af021a68f707511a"