Created
October 11, 2019 21:31
-
-
Save Ryanauger95/05d4f352bf29759b7f0418f861c49b72 to your computer and use it in GitHub Desktop.
Generate an ethereum private/public key pair
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
#!/usr/bin/env bash | |
openssl ecparam -name secp256k1 -genkey -noout | openssl ec -text -noout > Key | |
# Generate pub key | |
cat Key | grep pub -A 5 | tail -n +2 | tr -d '\n[:space:]:' | sed 's/^04//' > pub | |
# Generate priv key | |
cat Key | grep priv -A 3 | tail -n +2 | tr -d '\n[:space:]:' | sed 's/^04//' > priv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment