Created
June 19, 2018 21:28
-
-
Save rhelmer/3331ca166bcc9ee05c21a1834fa58cea to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| #!/usr/bin/env python | |
| # | |
| # Simple script to generate a CURVE25519 keypair. | |
| # brew install libsodium && pip install pysodium | |
| import pysodium | |
| keypair = pysodium.crypto_box_keypair() | |
| toHex = lambda x: "".join("{:02X}".format(ord(c)) for c in x) | |
| print "Public key", toHex(keypair[0]) | |
| print "Secret key", toHex(keypair[1]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment