datrs / hypercore

Secure, distributed, append-only log
https://docs.rs/hypercore
Apache License 2.0
333 stars 37 forks source link

Possible issue with signing data. #60

Open SirRujak opened 5 years ago

SirRujak commented 5 years ago

Bug Report

Your Environment

Software Version(s)
hypercore Master Branch
Rustc N/A
Operating System N/A

Expected Behavior

If I understand correctly the sign function in hypercore/crypto should be using the secret/private key to sign the data rather than the public key.

Current Behavior

Currently using the public key rather than private key from what I can tell.

Code Sample

https://github.com/datrs/hypercore/blob/master/src/crypto/key_pair.rs#L15-L22