Skip to content

Releases: dchest/tweetnacl-js

Important security fix

10 Feb 19:49
Compare
Choose a tag to compare

IMPORTANT BUG FIX. Due to a bug in calculating carry in
modulo reduction that used bit operations on integers larger than
32 bits, nacl.sign or nacl.sign.detached could have created
incorrect signatures.

This only affects signing, not verification.

Thanks to @valerini on GitHub for finding and reporting the bug.

v1.0.2

10 Feb 19:49
Compare
Choose a tag to compare

Exported more internal undocumented functions for
third-party projects that rely on low-level interface,
(something users of TweetNaCl shouldn't care about).

v1.0.1

24 Jan 14:53
Compare
Choose a tag to compare
  • Fixed TypeScript typings (#157)
  • Rebuilt using newer version of Uglify-js.

v1.0.0

22 May 18:42
Compare
Choose a tag to compare

🗝 🎉 🔐

Changes since v1.0.0-rc.1

No code changes

Changes since v0.14.5:

  • IMPORTANT! In previous versions, nacl.secretbox.open, nacl.box.open, and nacl.box.after returned false when opening failed (for example, when using incorrect key, nonce, or when input was maliciously or accidentally modified after encryption). This version instead returns null.

    The usual way to check for this condition:

    if (!result) { ... }

    is correct and will continue to work.

    However, direct comparison with false:

    if (result == false) { ... }

    it will no longer work and will not detect failure. Please check your code for this condition.

    (nacl.sign.open always returned null, so it is not affected.)

  • Arguments type check now uses instanceof Uint8Array instead of Object.prototype.toString.

  • Removed deprecation checks for nacl.util (moved to a
    separate package in v0.14.0).

  • Removed deprecation checks for the old signature API (changed in v0.10.0).

  • Improved benchmarking.

v1.0.0-rc.1 (release candidate)

22 Feb 11:39
1.0.0-rc.1
Compare
Choose a tag to compare
Pre-release
  • IMPORTANT! In previous versions, nacl.secretbox.open, nacl.box.open, and nacl.box.after returned false when opening failed (for example, when using incorrect key, nonce, or when input was maliciously or accidentally modified after encryption). This version instead returns null.

    The usual way to check for this condition:

    if (!result) { ... }

    is correct and will continue to work.

    However, direct comparison with false:

    if (result == false) { ... }

    it will no longer work and will not detect failure. Please check your code for this condition.

    (nacl.sign.open always returned null, so it is not affected.)

  • Arguments type check now uses instanceof Uint8Array instead of Object.prototype.toString.

  • Removed deprecation checks for nacl.util (moved to a
    separate package in v0.14.0).

  • Removed deprecation checks for the old signature API (changed in v0.10.0).

  • Improved benchmarking.

v0.14.5

13 Dec 11:12
v0.14.5
Compare
Choose a tag to compare
  • Fixed incomplete return types in TypeScript typings.
  • Replaced COPYING.txt with LICENSE file, which now has public domain dedication
    text from The Unlicense. License fields in package.json and bower.json have
    been set to "Unlicense". The project was and will be in the public domain --
    this change just makes it easier for automated tools to know about this fact by
    using the widely recognized and SPDX-compatible template for public domain
    dedication.

v0.14.4

02 Dec 18:09
v0.14.4
Compare
Choose a tag to compare
  • Added TypeScript type definitions (contributed by @AndSDev).
  • Improved benchmarking code.

Good news, everyone!

29 Mar 04:16
Compare
Choose a tag to compare

The bug in the fast version of Poly1305 has been fixed and this version is back into nacl-fast.js. Thanks to @floodyberry for promptly responding and fixing it:

"The issue was not properly detecting if st->h was >= 2^130 - 5, coupled with [testing mistake] not catching the failure. The chance of the bug affecting anything in the real world is essentially zero luckily, but it's good to have it fixed."

floodyberry/poly1305-donna#2 (comment)

Commit in TweetNaCl.js: 6dcbcaf
Commit in Poly1305-donna: floodyberry/poly1305-donna@0911057

Important bug fix in fast version

28 Mar 17:49
Compare
Choose a tag to compare

This update switches Poly1305 fast version back to original (slow) version.

There was a bug in fast version of Poly1305 which sometimes produced incorrect results. Authenticity of results of the following functions may be affected: secretbox, secretbox.open, box, box.open.

Fast version is default if you used npm package (e.g. require("tweetnacl")).

TweetNaCl.js comes in two favors: nacl.js, which is almost the exact port of TweetNaCl, and nacl-fast.js, which includes faster versions ported from other implementations. The fast version of Poly1305 message authenticator comes from 16-bit version of floodyberry/poly1305-donna. The bug is present in this version and was ported to JavaScript.

Until we figure how to fix the bug, Poly1305 in nacl-fast.js was switched to original nacl.js.

v0.14.1

25 Feb 00:35
Compare
Choose a tag to compare

No code changes, just tweaked packaging and added COPYING.txt.