-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #48 from Foundation-Devices/PASS1-515-document-dev…
…eloper-pubkey-setup Pass1-515: document developer pubkey setup
- Loading branch information
Showing
2 changed files
with
30 additions
and
2 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
keynum=$1 | ||
if [ -z "$keynum" ]; then | ||
echo "No key number specified" | ||
exit 1 | ||
fi | ||
# Generate an ECKEY | ||
openssl ecparam -name secp256k1 -genkey -noout -out ${keynum}.pem | ||
# Get the corresponding public key | ||
openssl ec -in ${keynum}.pem -pubout -out ${keynum}-pub.pem | ||
# Convert the public key to a binary file | ||
openssl ec -pubin -inform PEM -outform DER -in ${keynum}-pub.pem -out ${keynum}-pub.bin | ||
# Dump public key so that we can get the text required for pulling it into the code | ||
openssl ec -in ${keynum}.pem -pubout -text |