cli
cli copied to clipboard
add es256k (secp256k1 curve) support
Fix #222
I'm using github.com/decred/dcrd/dcrec/secp256k1/v4 which is go-native implementation for secp256k1 curve.
My first attempt to add the support into current code. Not super clean so looking for feedbacks to fit better into the current design.
Feel free to contribute into this PR as needed. I will try to find time to update as feedbacks coming in and complete the TODO.
TODO:
- [x]
step crypto key signandstep crypto key verify - [ ]
step crypto keypair
Example:
echo "my data" | step crypto key sign -key /tmp/priv.key -alg es256k -format b64
echo "my data" | step crypto key verify -key /tmp/pub.key -alg es256k -signature xxxx
I'm not opposed to adding support for secp256k1 on the cli, but perhaps a better place for this code would be in go.step.sm/crypto