Skip to content

Commit 9293cc5

Browse files
committed
Add enum COSEKeyCrvs.
1 parent f75b608 commit 9293cc5

3 files changed

Lines changed: 68 additions & 51 deletions

File tree

cwt/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
from .enums import (
1616
COSEAlgs,
1717
COSEHeaders,
18+
COSEKeyCrvs,
1819
COSEKeyOps,
1920
COSEKeyParams,
2021
COSEKeyTypes,
@@ -46,6 +47,7 @@
4647
"COSE",
4748
"COSEAlgs",
4849
"COSEHeaders",
50+
"COSEKeyCrvs",
4951
"COSEKeyOps",
5052
"COSEKeyParams",
5153
"COSEKeyTypes",

cwt/enums.py

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,6 @@ class COSEHeaders(enum.IntEnum):
3434
CUPH_OWNER_PUB_KEY = 257
3535

3636

37-
class COSEKeyTypes(enum.IntEnum):
38-
OKP = 1
39-
EC2 = 2
40-
RSA = 3
41-
ASYMMETRIC = 4
42-
# HSS_LMS = 5
43-
# WALNUT_DSA = 6
44-
45-
4637
class COSEKeyParams(enum.IntEnum):
4738
KTY = 1
4839
KID = 2
@@ -148,6 +139,26 @@ class CWTClaims(enum.IntEnum):
148139
SUBMODS = 20
149140

150141

142+
class COSEKeyTypes(enum.IntEnum):
143+
OKP = 1
144+
EC2 = 2
145+
RSA = 3
146+
ASYMMETRIC = 4
147+
# HSS_LMS = 5
148+
# WALNUT_DSA = 6
149+
150+
151+
class COSEKeyCrvs(enum.IntEnum):
152+
P256 = 1
153+
P384 = 2
154+
P521 = 3
155+
X25519 = 4
156+
X448 = 5
157+
ED25519 = 6
158+
ED448 = 7
159+
SECP256K1 = 8
160+
161+
151162
class COSEKeyOps(enum.IntEnum):
152163
SIGN = 1
153164
VERIFY = 2

0 commit comments

Comments
 (0)