Funktionierender Prototyp des Serious Games zur Vermittlung von Wissen zu Software-Engineering-Arbeitsmodellen.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

rfc8692.py 2.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. #
  2. # This file is part of pyasn1-modules software.
  3. #
  4. # Created by Russ Housley with assistance from asn1ate v.0.6.0.
  5. #
  6. # Copyright (c) 2019, Vigil Security, LLC
  7. # License: http://snmplabs.com/pyasn1/license.html
  8. #
  9. # Algorithm Identifiers for RSASSA-PSS and ECDSA using SHAKEs
  10. #
  11. # ASN.1 source from:
  12. # https://www.rfc-editor.org/rfc/rfc8692.txt
  13. #
  14. from pyasn1.type import univ
  15. from pyasn1_modules import rfc4055
  16. from pyasn1_modules import rfc5280
  17. from pyasn1_modules import rfc5480
  18. # SHAKE128 One-Way Hash Function
  19. id_shake128 = univ.ObjectIdentifier('2.16.840.1.101.3.4.2.11')
  20. mda_shake128 = rfc5280.AlgorithmIdentifier()
  21. mda_shake128['algorithm'] = id_shake128
  22. # mda_shake128['parameters'] is absent
  23. # SHAKE256 One-Way Hash Function
  24. id_shake256 = univ.ObjectIdentifier('2.16.840.1.101.3.4.2.12')
  25. mda_shake256 = rfc5280.AlgorithmIdentifier()
  26. mda_shake256['algorithm'] = id_shake256
  27. # mda_shake256['parameters'] is absent
  28. # RSA PSS with SHAKE128
  29. id_RSASSA_PSS_SHAKE128 = univ.ObjectIdentifier('1.3.6.1.5.5.7.6.30')
  30. sa_rSASSA_PSS_SHAKE128 = rfc5280.AlgorithmIdentifier()
  31. sa_rSASSA_PSS_SHAKE128['algorithm'] = id_RSASSA_PSS_SHAKE128
  32. # sa_rSASSA_PSS_SHAKE128['parameters'] is absent
  33. pk_rsaSSA_PSS_SHAKE128 = rfc4055.RSAPublicKey()
  34. # RSA PSS with SHAKE256
  35. id_RSASSA_PSS_SHAKE256 = univ.ObjectIdentifier('1.3.6.1.5.5.7.6.31')
  36. sa_rSASSA_PSS_SHAKE256 = rfc5280.AlgorithmIdentifier()
  37. sa_rSASSA_PSS_SHAKE256['algorithm'] = id_RSASSA_PSS_SHAKE256
  38. # sa_rSASSA_PSS_SHAKE256['parameters'] is absent
  39. pk_rsaSSA_PSS_SHAKE256 = rfc4055.RSAPublicKey()
  40. # ECDSA with SHAKE128
  41. id_ecdsa_with_shake128 = univ.ObjectIdentifier('1.3.6.1.5.5.7.6.32')
  42. sa_ecdsa_with_shake128 = rfc5280.AlgorithmIdentifier()
  43. sa_ecdsa_with_shake128['algorithm'] = id_ecdsa_with_shake128
  44. # sa_ecdsa_with_shake128['parameters'] is absent
  45. pk_ec = rfc5480.ECPoint()
  46. # ECDSA with SHAKE128
  47. id_ecdsa_with_shake256 = univ.ObjectIdentifier('1.3.6.1.5.5.7.6.33')
  48. sa_ecdsa_with_shake256 = rfc5280.AlgorithmIdentifier()
  49. sa_ecdsa_with_shake256['algorithm'] = id_ecdsa_with_shake256
  50. # sa_ecdsa_with_shake256['parameters'] is absent