Message Signing
Blacknet account can sign a message for the purpose of authenticated out-of-band communication.[1]
The used digital signature scheme is Ed25519-BLAKE2b.[2][3]
The message is fed into BLAKE2b-256 hashing function with a prefix Blacknet Signed Message:\n
.
Verification requires an account address, a message signature, an original message.
Make sure the message is nonreplayable as needed for your use case.
RPC
Sign message Type POST Path /api/v2/signmessage Parameters mnemonic mnemonic of signing account message text message Returns signature.
Verify message Type GET Path /api/v2/verifymessage/{from}/{signature}/{message} Parameters from address of signing account signature signature to verify message text message Returns boolean.
Libraries
- Dart https://pub.dev/packages/blacknet_lib
- Go https://gitlab.com/blacknet-ninja/blacknetgo-lib
- JavaScript https://www.npmjs.com/package/blacknetjs
- PHP https://packagist.org/packages/blacknet/lib
RPC-CLI
References
- khal, Sign and verify message with bitcoin address and public key, .
- Daniel Bernstein, Niels Duif, Tanja Lange, Peter Schwabe, Bo-Yin Yang, High-speed high-security signatures, .
- Jean-Philippe Aumasson, Samuel Neves, Zooko Wilcox-O’Hearn, Christian Winnerlein, BLAKE2: simpler, smaller, fast as MD5, .