generate-key 554 B

123456789101112131415161718
  1. #!/usr/bin/env python
  2. # Use this to generate a signing key and verify key for use in sydent
  3. # configurations.
  4. # The signing key is generally used in "ed25519.signingkey" in the sydent config
  5. import signedjson.key
  6. import sys
  7. signing_key = signedjson.key.generate_signing_key(0);
  8. sk_str = "%s %s %s" % (
  9. signing_key.alg,
  10. signing_key.version,
  11. signedjson.key.encode_signing_key_base64(signing_key)
  12. )
  13. print "signing key: %s " % sk_str
  14. pk_str = signedjson.key.encode_verify_key_base64(signing_key.verify_key)
  15. print "verify key: %s" % pk_str