__init__.py 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. # while we don't use six in this file, we did bundle it for a long time, so
  2. # keep as part of module in a virtual way (through __all__)
  3. import six
  4. from .keys import (
  5. SigningKey,
  6. VerifyingKey,
  7. BadSignatureError,
  8. BadDigestError,
  9. MalformedPointError,
  10. )
  11. from .curves import (
  12. NIST192p,
  13. NIST224p,
  14. NIST256p,
  15. NIST384p,
  16. NIST521p,
  17. SECP256k1,
  18. BRAINPOOLP160r1,
  19. BRAINPOOLP192r1,
  20. BRAINPOOLP224r1,
  21. BRAINPOOLP256r1,
  22. BRAINPOOLP320r1,
  23. BRAINPOOLP384r1,
  24. BRAINPOOLP512r1,
  25. SECP112r1,
  26. SECP112r2,
  27. SECP128r1,
  28. SECP160r1,
  29. Ed25519,
  30. Ed448,
  31. BRAINPOOLP160t1,
  32. BRAINPOOLP192t1,
  33. BRAINPOOLP224t1,
  34. BRAINPOOLP256t1,
  35. BRAINPOOLP320t1,
  36. BRAINPOOLP384t1,
  37. BRAINPOOLP512t1,
  38. )
  39. from .ecdh import (
  40. ECDH,
  41. NoKeyError,
  42. NoCurveError,
  43. InvalidCurveError,
  44. InvalidSharedSecretError,
  45. )
  46. from .der import UnexpectedDER
  47. from . import _version
  48. # This code comes from http://github.com/tlsfuzzer/python-ecdsa
  49. __all__ = [
  50. "curves",
  51. "der",
  52. "ecdsa",
  53. "ellipticcurve",
  54. "keys",
  55. "numbertheory",
  56. "test_pyecdsa",
  57. "util",
  58. "six",
  59. ]
  60. _hush_pyflakes = [
  61. SigningKey,
  62. VerifyingKey,
  63. BadSignatureError,
  64. BadDigestError,
  65. MalformedPointError,
  66. UnexpectedDER,
  67. InvalidCurveError,
  68. NoKeyError,
  69. InvalidSharedSecretError,
  70. ECDH,
  71. NoCurveError,
  72. NIST192p,
  73. NIST224p,
  74. NIST256p,
  75. NIST384p,
  76. NIST521p,
  77. SECP256k1,
  78. BRAINPOOLP160r1,
  79. BRAINPOOLP192r1,
  80. BRAINPOOLP224r1,
  81. BRAINPOOLP256r1,
  82. BRAINPOOLP320r1,
  83. BRAINPOOLP384r1,
  84. BRAINPOOLP512r1,
  85. SECP112r1,
  86. SECP112r2,
  87. SECP128r1,
  88. SECP160r1,
  89. Ed25519,
  90. Ed448,
  91. six.b(""),
  92. BRAINPOOLP160t1,
  93. BRAINPOOLP192t1,
  94. BRAINPOOLP224t1,
  95. BRAINPOOLP256t1,
  96. BRAINPOOLP320t1,
  97. BRAINPOOLP384t1,
  98. BRAINPOOLP512t1,
  99. ]
  100. del _hush_pyflakes
  101. __version__ = _version.get_versions()["version"]