Skip to content

Commit

Permalink
Add OIDs for ECDSA-PLAIN (#258)
Browse files Browse the repository at this point in the history
(Sourced from BSI TR-03111)
  • Loading branch information
MatthiasValvekens authored Aug 23, 2023
1 parent ac14c7a commit 896166d
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions asn1crypto/algos.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,16 @@ class SignedDigestAlgorithmId(ObjectIdentifier):
# RFC 8410 -- https://tools.ietf.org/html/rfc8410
'1.3.101.112': 'ed25519',
'1.3.101.113': 'ed448',
# Source: BSI TR-03111 V-2
'0.4.0.127.0.7.1.1.4.1.1': 'sha1_ecdsa_plain',
'0.4.0.127.0.7.1.1.4.1.2': 'sha224_ecdsa_plain',
'0.4.0.127.0.7.1.1.4.1.3': 'sha256_ecdsa_plain',
'0.4.0.127.0.7.1.1.4.1.4': 'sha384_ecdsa_plain',
'0.4.0.127.0.7.1.1.4.1.5': 'sha512_ecdsa_plain',
'0.4.0.127.0.7.1.1.4.1.8': 'sha3_224_ecdsa_plain',
'0.4.0.127.0.7.1.1.4.1.9': 'sha3_256_ecdsa_plain',
'0.4.0.127.0.7.1.1.4.1.10': 'sha3_384_ecdsa_plain',
'0.4.0.127.0.7.1.1.4.1.11': 'sha3_512_ecdsa_plain',
}

_reverse_map = {
Expand Down Expand Up @@ -314,6 +324,15 @@ class SignedDigestAlgorithmId(ObjectIdentifier):
'sha3_512_rsa': '2.16.840.1.101.3.4.3.16',
'ed25519': '1.3.101.112',
'ed448': '1.3.101.113',
'sha1_ecdsa_plain': '0.4.0.127.0.7.1.1.4.1.1',
'sha224_ecdsa_plain': '0.4.0.127.0.7.1.1.4.1.2',
'sha256_ecdsa_plain': '0.4.0.127.0.7.1.1.4.1.3',
'sha384_ecdsa_plain': '0.4.0.127.0.7.1.1.4.1.4',
'sha512_ecdsa_plain': '0.4.0.127.0.7.1.1.4.1.5',
'sha3_224_ecdsa_plain': '0.4.0.127.0.7.1.1.4.1.8',
'sha3_256_ecdsa_plain': '0.4.0.127.0.7.1.1.4.1.9',
'sha3_384_ecdsa_plain': '0.4.0.127.0.7.1.1.4.1.10',
'sha3_512_ecdsa_plain': '0.4.0.127.0.7.1.1.4.1.11',
}


Expand Down Expand Up @@ -371,6 +390,15 @@ def signature_algo(self):
'sha3_256_ecdsa': 'ecdsa',
'sha3_384_ecdsa': 'ecdsa',
'sha3_512_ecdsa': 'ecdsa',
'sha1_ecdsa_plain': 'ecdsa',
'sha224_ecdsa_plain': 'ecdsa',
'sha256_ecdsa_plain': 'ecdsa',
'sha384_ecdsa_plain': 'ecdsa',
'sha512_ecdsa_plain': 'ecdsa',
'sha3_224_ecdsa_plain': 'ecdsa',
'sha3_256_ecdsa_plain': 'ecdsa',
'sha3_384_ecdsa_plain': 'ecdsa',
'sha3_512_ecdsa_plain': 'ecdsa',
'ecdsa': 'ecdsa',
'ed25519': 'ed25519',
'ed448': 'ed448',
Expand Down Expand Up @@ -409,10 +437,15 @@ def hash_algo(self):
'sha384_dsa': 'sha384',
'sha512_dsa': 'sha512',
'sha1_ecdsa': 'sha1',
'sha1_ecdsa_plain': 'sha1',
'sha224_ecdsa': 'sha224',
'sha256_ecdsa': 'sha256',
'sha384_ecdsa': 'sha384',
'sha512_ecdsa': 'sha512',
'sha224_ecdsa_plain': 'sha224',
'sha256_ecdsa_plain': 'sha256',
'sha384_ecdsa_plain': 'sha384',
'sha512_ecdsa_plain': 'sha512',
'sha3_224_dsa': 'sha3_224',
'sha3_256_dsa': 'sha3_256',
'sha3_384_dsa': 'sha3_384',
Expand All @@ -421,6 +454,10 @@ def hash_algo(self):
'sha3_256_ecdsa': 'sha3_256',
'sha3_384_ecdsa': 'sha3_384',
'sha3_512_ecdsa': 'sha3_512',
'sha3_224_ecdsa_plain': 'sha3_224',
'sha3_256_ecdsa_plain': 'sha3_256',
'sha3_384_ecdsa_plain': 'sha3_384',
'sha3_512_ecdsa_plain': 'sha3_512',
'sha3_224_rsa': 'sha3_224',
'sha3_256_rsa': 'sha3_256',
'sha3_384_rsa': 'sha3_384',
Expand Down

0 comments on commit 896166d

Please sign in to comment.