Skip to content

Latest commit

 

History

History
15 lines (15 loc) · 904 Bytes

README.md

File metadata and controls

15 lines (15 loc) · 904 Bytes

Get your hands on a 256 bits private key. First generate an Ethereum address and uncompressed public key:

cargo run generatekeypair <private key>

To sign anything using ECDSA(you can use the test image.jpg in the root directory too), first put the file in the root directory. You will also need to have the private and public key files created. Replace the <image.jpg> with your filename in the following command:

cargo run sign image.jpg <Private Key filename>

The signature will get stored in a file named "ECDSA_Signature". To verify the signature, first make sure the public key file has been created and replace <image.jpg> with your filename:

cargo run verify image.jpg <Public Key filename> ECDSA_Signature

It has a limitation, it is not able to sign or verify more than one file at the same time. You need to delete the "ECDSA_Signature" file before signing another file.