Security considerations and limitations
masterTweetNaCl.js is a low-level library. Users should be aware of the following properties of its primitives:
- No secret key commitment:
nacl.secretboxandnacl.boxare not key-committing; a ciphertext might decrypt to valid plaintexts under different keys. - Signature malleability: Ed25519 signatures (
nacl.sign) are malleable; one can create a different valid signature for the same message without the secret key. - Hash length-extension: The SHA-512 implementation (
nacl.hash) is not resistant to length-extension attacks. - Side-channel attacks: While using algorithmic constant-time operations, physical constant-time execution cannot be guaranteed due to JavaScript runtimes and JIT compilers.