ltonetwork / seasalt

NaCl compatible cryptography library using Bouncy Castle (Java)
Apache License 2.0
3 stars 1 forks source link

Add functions for signatures and message combined #8

Open KaloyanTanev opened 3 years ago

KaloyanTanev commented 3 years ago

Add sign(byte[] msg, byte[] privateKey) and verify(byte[] signature, byte[] publicKey) methods. Those will be used on signatures which have the data attached to them.

Useful thread: http://bouncy-castle.1462172.n4.nabble.com/Add-signed-content-to-detached-signatures-td1467150.html#a3387511. However, the solution proposed here uses deprecated methods.

jasny commented 3 years ago

These functions should be the equivalent of the "combined" functions of libsodium. https://libsodium.gitbook.io/doc/public-key_cryptography/public-key_signatures#combined-mode