Important bug fix in fast version
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
.