Skip to content

Commit 6102a94

Browse files
Remove uses of secp244k1
Remove all code guarded by `PSA_WANT_ECC_SECP_K1_224`, which is not and will not be implemented. (It would be K1_225 anyway, but we don't intend to implement it anyway.) Signed-off-by: Gilles Peskine <[email protected]>
1 parent 421e1d6 commit 6102a94

File tree

8 files changed

+1
-40
lines changed

8 files changed

+1
-40
lines changed

configs/ext/crypto_config_profile_medium.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -198,12 +198,6 @@
198198
//#define PSA_WANT_ECC_MONTGOMERY_255 1
199199
//#define PSA_WANT_ECC_MONTGOMERY_448 1
200200
//#define PSA_WANT_ECC_SECP_K1_192 1
201-
/*
202-
* SECP224K1 is buggy via the PSA API in Mbed TLS
203-
* (https://github.com/Mbed-TLS/mbedtls/issues/3541). Thus, do not enable it by
204-
* default.
205-
*/
206-
//#define PSA_WANT_ECC_SECP_K1_224 1
207201
//#define PSA_WANT_ECC_SECP_K1_256 1
208202
//#define PSA_WANT_ECC_SECP_R1_192 1
209203
//#define PSA_WANT_ECC_SECP_R1_224 1

include/mbedtls/check_config.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
defined(MBEDTLS_PSA_ACCEL_ECC_MONTGOMERY_255) || \
4444
defined(MBEDTLS_PSA_ACCEL_ECC_MONTGOMERY_448) || \
4545
defined(MBEDTLS_PSA_ACCEL_ECC_SECP_K1_192) || \
46-
defined(MBEDTLS_PSA_ACCEL_ECC_SECP_K1_224) || \
4746
defined(MBEDTLS_PSA_ACCEL_ECC_SECP_K1_256) || \
4847
defined(MBEDTLS_PSA_ACCEL_ECC_SECP_R1_192) || \
4948
defined(MBEDTLS_PSA_ACCEL_ECC_SECP_R1_224) || \

library/ssl_tls.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6266,9 +6266,6 @@ static const struct {
62666266
#if defined(PSA_WANT_ECC_SECP_R1_224)
62676267
{ 21, MBEDTLS_ECP_DP_SECP224R1, PSA_ECC_FAMILY_SECP_R1, 224 },
62686268
#endif
6269-
#if defined(PSA_WANT_ECC_SECP_K1_224)
6270-
{ 20, MBEDTLS_ECP_DP_SECP224K1, PSA_ECC_FAMILY_SECP_K1, 224 },
6271-
#endif
62726269
#if defined(PSA_WANT_ECC_SECP_R1_192)
62736270
{ 19, MBEDTLS_ECP_DP_SECP192R1, PSA_ECC_FAMILY_SECP_R1, 192 },
62746271
#endif

programs/ssl/ssl_test_lib.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -518,11 +518,6 @@ static const struct {
518518
#else
519519
{ MBEDTLS_SSL_IANA_TLS_GROUP_SECP224R1, "secp224r1", 0 },
520520
#endif
521-
#if defined(MBEDTLS_ECP_DP_SECP224K1_ENABLED) || defined(PSA_WANT_ECC_SECP_K1_224)
522-
{ MBEDTLS_SSL_IANA_TLS_GROUP_SECP224K1, "secp224k1", 1 },
523-
#else
524-
{ MBEDTLS_SSL_IANA_TLS_GROUP_SECP224K1, "secp224k1", 0 },
525-
#endif
526521
#if defined(MBEDTLS_ECP_DP_SECP192R1_ENABLED) || defined(PSA_WANT_ECC_SECP_R1_192)
527522
{ MBEDTLS_SSL_IANA_TLS_GROUP_SECP192R1, "secp192r1", 1 },
528523
#else

scripts/config.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,8 @@ def realfull_adapter(_name, _value, _active):
6060
'PSA_WANT_KEY_TYPE_RSA_KEY_PAIR'
6161
])
6262

63-
PSA_UNSTABLE_FEATURE = frozenset([
64-
'PSA_WANT_ECC_SECP_K1_224'
65-
])
66-
6763
EXCLUDE_FROM_CRYPTO = PSA_UNSUPPORTED_FEATURE | \
68-
PSA_DEPRECATED_FEATURE | \
69-
PSA_UNSTABLE_FEATURE
64+
PSA_DEPRECATED_FEATURE
7065

7166
# The goal of the full configuration is to have everything that can be tested
7267
# together. This includes deprecated or insecure options. It excludes:
@@ -114,7 +109,6 @@ def realfull_adapter(_name, _value, _active):
114109
'MBEDTLS_PSA_STATIC_KEY_SLOT_BUFFER_SIZE', # only relevant for embedded devices
115110
*PSA_UNSUPPORTED_FEATURE,
116111
*PSA_DEPRECATED_FEATURE,
117-
*PSA_UNSTABLE_FEATURE
118112
])
119113

120114
def is_seamless_alt(name):
@@ -367,8 +361,6 @@ def set(self, name, value='1'):
367361

368362
if name in PSA_UNSUPPORTED_FEATURE:
369363
raise ValueError(f'Feature is unsupported: \'{name}\'')
370-
if name in PSA_UNSTABLE_FEATURE:
371-
raise ValueError(f'Feature is unstable: \'{name}\'')
372364

373365
if name not in self.settings:
374366
self._get_configfile().templates.append((name, '', '#define ' + name + ' '))
@@ -417,8 +409,6 @@ def set(self, name, value=None):
417409
if configfile == self.crypto_configfile:
418410
if name in PSA_UNSUPPORTED_FEATURE:
419411
raise ValueError(f'Feature is unsupported: \'{name}\'')
420-
if name in PSA_UNSTABLE_FEATURE:
421-
raise ValueError(f'Feature is unstable: \'{name}\'')
422412

423413
# The default value in the crypto config is '1'
424414
if not value and re.match(self._crypto_regexp, name):

tests/scripts/analyze_outcomes.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,6 @@ def _has_word_re(words: typing.Iterable[str],
132132
'Config: PSA_WANT_ALG_CBC_MAC',
133133
# Algorithm declared but not supported.
134134
'Config: PSA_WANT_ALG_XTS',
135-
# Family declared but not supported.
136-
'Config: PSA_WANT_ECC_SECP_K1_224',
137135
# More granularity of key pair type enablement macros
138136
# than we care to test.
139137
# https://github.com/Mbed-TLS/mbedtls/issues/9590

tests/ssl-opt.sh

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2690,13 +2690,6 @@ requires_config_enabled PSA_WANT_ECC_BRAINPOOL_P_R1_256
26902690
run_test_psa_force_curve "brainpoolP256r1"
26912691
requires_config_enabled PSA_WANT_ECC_SECP_R1_224
26922692
run_test_psa_force_curve "secp224r1"
2693-
## SECP224K1 is buggy via the PSA API
2694-
## (https://github.com/Mbed-TLS/mbedtls/issues/3541),
2695-
## so it is disabled in PSA even when it's enabled in Mbed TLS.
2696-
## The proper dependency would be on PSA_WANT_ECC_SECP_K1_224 but
2697-
## dependencies on PSA symbols in ssl-opt.sh are not implemented yet.
2698-
#requires_config_enabled PSA_WANT_ECC_SECP_K1_224
2699-
#run_test_psa_force_curve "secp224k1"
27002693
requires_config_enabled PSA_WANT_ECC_SECP_R1_192
27012694
run_test_psa_force_curve "secp192r1"
27022695
requires_config_enabled PSA_WANT_ECC_SECP_K1_192

tests/suites/test_suite_ssl.function

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3595,11 +3595,6 @@ void elliptic_curve_get_properties()
35953595
#else
35963596
TEST_UNAVAILABLE_ECC(21, MBEDTLS_ECP_DP_SECP224R1, PSA_ECC_FAMILY_SECP_R1, 224);
35973597
#endif
3598-
#if defined(PSA_WANT_ECC_SECP_K1_224)
3599-
TEST_AVAILABLE_ECC(20, MBEDTLS_ECP_DP_SECP224K1, PSA_ECC_FAMILY_SECP_K1, 224);
3600-
#else
3601-
TEST_UNAVAILABLE_ECC(20, MBEDTLS_ECP_DP_SECP224K1, PSA_ECC_FAMILY_SECP_K1, 224);
3602-
#endif
36033598
#if defined(PSA_WANT_ECC_SECP_R1_192)
36043599
TEST_AVAILABLE_ECC(19, MBEDTLS_ECP_DP_SECP192R1, PSA_ECC_FAMILY_SECP_R1, 192);
36053600
#else

0 commit comments

Comments
 (0)