diff options
author | Ramakrishnan Muthukrishnan <ram@rkrishnan.org> | 2016-11-12 09:44:27 +0530 |
---|---|---|
committer | Ramakrishnan Muthukrishnan <ram@rkrishnan.org> | 2016-11-12 09:44:27 +0530 |
commit | 1edafce055fd325b6618bbbc3fb3645a96c0ded2 (patch) | |
tree | 8af4bd3d580ef6d86790378534b441ac436d4afd /src/pycryptopp/publickey/ed25519/keys.py | |
parent | dc3a10d68e1b549024eb307c73b0d0a449a48053 (diff) |
Imported Upstream version 0.7.1
Diffstat (limited to 'src/pycryptopp/publickey/ed25519/keys.py')
-rw-r--r-- | src/pycryptopp/publickey/ed25519/keys.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/pycryptopp/publickey/ed25519/keys.py b/src/pycryptopp/publickey/ed25519/keys.py index 5d7eafb..ebd82ff 100644 --- a/src/pycryptopp/publickey/ed25519/keys.py +++ b/src/pycryptopp/publickey/ed25519/keys.py @@ -1,6 +1,23 @@ import _ed25519 BadSignatureError = _ed25519.BadSignatureError +__doc__ = """\ +ed25519 -- Ed25519 public-key signatures + +To create a new Ed25519 signing key, create a 32-byte unguessable bytestring, +with keybytes=os.urandom(32), and pass it to the SigningKey(keybytes) +constructor. To create the same key in the future, call the constructor with +the same string. + +To get a verifying key from a signing key, first get the verifying key bytes +with verfbytes=sk.get_verifying_key_bytes(), then construct the VerifyingKey +instance with VerifyingKey(verfbytes). + +To sign a message, use sig=sk.sign(msg), which returns the signature as a +64-byte binary bytestring. To verify a signature, use vk.verify(sig, msg), +which either returns None or raises BadSignatureError. +""" + class SigningKey(object): # this is how all keys are created def __init__(self, sk_bytes): |