Skip to content

Instantly share code, notes, and snippets.

@njofce
Created November 7, 2022 20:09
Show Gist options
  • Save njofce/62429e98bc70d8671bd961defa82faa6 to your computer and use it in GitHub Desktop.
Save njofce/62429e98bc70d8671bd961defa82faa6 to your computer and use it in GitHub Desktop.
Generate ECDSA key pair
openssl ecparam -name secp256k1 -genkey -noout | openssl ec -text -noout > key
cat key | grep pub -A 5 | tail -n +2 | tr -d '\n[:space:]:' | sed 's/^04//' > pub
cat key | grep priv -A 3 | tail -n +2 | tr -d '\n[:space:]:' | sed 's/^00//' > priv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment