Skip to content

Commit a3d2b76

Browse files
authored
Merge pull request #194 from jschlyter/remove_binary_curves
Remove support for binary elliptic curves
2 parents 24c9483 + 0badfd1 commit a3d2b76

File tree

4 files changed

+3
-17
lines changed

4 files changed

+3
-17
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ select = [
7474
# isort
7575
"I",
7676
]
77-
ignore = ["E501", "I001", "SIM102", "UP006", "UP035", "UP045", "UP007"]
77+
ignore = ["E501", "I001", "SIM102", "UP006", "UP035", "UP045", "UP007", "UP038"]
7878
exclude = ["examples/*"]
7979

8080
[tool.ruff.lint.isort]

src/cryptojwt/jwk/ec.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,6 @@
1414
# This is used to translate between the curve representation in
1515
# Cryptography and the one used by NIST (and in RFC 7518)
1616
NIST2SEC = {
17-
"B-571": ec.SECT571R1,
18-
"K-571": ec.SECT571K1,
19-
"K-409": ec.SECT409K1,
20-
"K-283": ec.SECT283K1,
21-
"K-233": ec.SECT233K1,
22-
"K-163": ec.SECT163K1,
2317
"P-521": ec.SECP521R1,
2418
"P-384": ec.SECP384R1,
2519
"P-256": ec.SECP256R1,

tests/570-ec-sect571r1-keypair.pem

Lines changed: 0 additions & 8 deletions
This file was deleted.

tests/test_02_jwk.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ def test_load_pem_file_rsa():
528528

529529

530530
def test_load_pem_file_ec():
531-
key = ECKey().load(full_path("570-ec-sect571r1-keypair.pem"))
531+
key = ECKey().load(full_path("test_keys/ec-p256-private.pem"))
532532
assert key.has_private_key()
533533

534534

@@ -544,7 +544,7 @@ def test_key_from_jwk_dict_rsa():
544544

545545

546546
def test_key_from_jwk_dict_ec():
547-
key = ECKey().load(full_path("570-ec-sect571r1-keypair.pem"))
547+
key = ECKey().load(full_path("test_keys/ec-p256-private.pem"))
548548
assert key.has_private_key()
549549
jwk = key.serialize(private=True)
550550
_key = key_from_jwk_dict(jwk)

0 commit comments

Comments
 (0)