Created
December 6, 2022 16:16
-
-
Save izzygomez/b12a2b0d4abbd98b2e4e6c411c3d76be to your computer and use it in GitHub Desktop.
Python script to generate ed25519 private & public keys
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://pypi.org/project/PyNaCl/ | |
import nacl | |
import nacl.signing | |
import secrets | |
seed = secrets.token_bytes(32) | |
# Generate a new random signing key | |
signing_key = nacl.signing.SigningKey(seed) | |
# Obtain the hex-encoded signing key | |
print('Signing key:') | |
print(signing_key.encode().hex()) | |
# Obtain the hex-encoded verify key for the given signing key | |
# Use this in the Anchorage Digital Web Dashboard when creating an API key | |
print('Public key:') | |
print(signing_key.verify_key.encode().hex()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment