cli icon indicating copy to clipboard operation
cli copied to clipboard

add es256k (secp256k1 curve) support

Open trung opened this issue 3 years ago • 2 comments

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 sign and step 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

trung avatar Feb 23 '22 18:02 trung

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Feb 23 '22 18:02 CLAassistant

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

maraino avatar Feb 23 '22 19:02 maraino