1
0

generate-key 651 B

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