TweetNaCl.js
Keep, but not for new work. 9th of 10 cryptography and password hashing.
TweetNaCl.js is a small, audited, zero-dependency pure-JavaScript port of NaCl. It offers box, secretbox, Ed25519 signatures and SHA-512. Its maintainer calls it finished, there has been no release since 2020, and he now points users to WASM libsodium or WebCrypto. Keep it where it already runs, but for new work pick noble-curves with noble-ciphers, libsodium.js or WebCrypto.
Best for: Existing codebases that already use NaCl box or sign through TweetNaCl and want a frozen, dependency-free API.
Scores
Overall4.5
How strongly do we recommend it for a new project today?
Claude Opus 5.5: 4.0, likely 3.0 to 5.0
It is a safe, correct, frozen library, but its own maintainer points new users elsewhere. noble-curves with noble-ciphers, libsodium.js and native WebCrypto all do the same job with more features, better speed and active maintenance. It also does no password hashing. Keep it where it runs, and choose a peer for new work.
- github.com/dchest/tweetnacl-js/issues/253: Maintainer recommends WASM libsodium or WebCrypto
- peers noble-curves commitsLastYear: 118 commits and a 2026 release, versus 0 for TweetNaCl
- npm downloadsSame4WeeksYearAgo: Growth ratio of 2.0 is below the median of 4.1
GPT-6.2 Sol: 5.0, likely 3.9 to 6.2
TweetNaCl.js is a reasonable choice when a project needs the original NaCl format and a small, synchronous JavaScript library. For most new signing and encryption work, libsodium.js offers a broader API, faster Ed25519 in independent tests, and more active maintenance. The long release gap and open verification issues weigh more than the large installed base, while a firm compatibility requirement can raise its value.
- github.com/dchest/tweetnacl-js/blob/1.0.3/README.md: Documents the synchronous NaCl-compatible API.
- github.com/jedisct1/libsodium.js: Documents a broader set of primitives, including streaming encryption.
- diva-portal.org/smash/get/diva2%3A1805402/FULLTEXT01.pdf: Independent measurements favor libsodium.js for signing and verification.
- github.com/dchest/tweetnacl-js/issues/271: Stricter signature verification remains a proposal.
- npm.latestPublishedAt and peers: TweetNaCl.js last published in 2020, while libsodium.js published in 2026.
Needed by many4.1
How many developers need a tool for this job?
Claude Opus 5.5: 4.0, likely 3.0 to 5.0
Public-key encryption and signing in JavaScript is a clear but limited need, mostly in end-to-end encryption, crypto-wallet and protocol work. TweetNaCl covers only the NaCl primitives and does no password hashing, which is half of the category's job. WebCrypto now covers much of the same ground natively.
- github.com/dchest/tweetnacl-js: Primitives: box, secretbox, Ed25519, SHA-512; no password hashing
- groups.google.com/a/chromium.org/g/blink-dev/c/T2kriFdjXsg: Chrome ships WebCrypto Ed25519/X25519 natively
GPT-6.2 Sol: 4.2, likely 3.2 to 5.4
Signing and authenticated encryption matter to projects such as messaging apps, wallets, and protocol implementations. TweetNaCl.js works in browsers and Node.js, but its fixed NaCl primitives leave out password hashing and make it most relevant when compatibility matters. Browser measurements give some context, while demand across server projects remains harder to measure.
- github.com/dchest/tweetnacl-js/blob/1.0.3/README.md: Documents the fixed set of primitives and supported runtimes.
- almanac.httparchive.org/en/2025/security#web-cryptography-api: Measures browser signing and encryption on a small share of crawled pages.
Helps a lot5.7
How well does it do the job for those who need it?
Claude Opus 5.5: 5.0, likely 4.0 to 6.0
It does what it promises, and the audit found no security problems. It also ships types and has a simple API that AI agents write well. But it lacks AEAD with associated data, hashes such as BLAKE2 or SHA-3, and any key derivation or password hashing. Its signatures are malleable, and it is slower than noble or WASM libsodium. Peers in the bundle do the same job with more features and active upkeep.
- github.com/dchest/tweetnacl-js: README lists no key commitment, signature malleability and no side-channel guarantees
- github.com/dchest/tweetnacl-js/issues/253: Malleability fix deferred until a possible 2.0
- npm hasTypes: Ships TypeScript types
GPT-6.2 Sol: 6.4, likely 5.3 to 7.5
Version 1.0.3 has a compact synchronous API for NaCl encryption and Ed25519, with documented byte inputs and typed failure returns. Callers manage nonces, and signature verification is permissive by current standards. Independent benchmarks favor libsodium.js for Ed25519, while symmetric performance varies by workload. The documentation makes routine calls easy to follow, but evidence on AI agent handling of nonce and encoding rules is thin.
- github.com/dchest/tweetnacl-js/blob/1.0.3/README.md: Documents the API, nonce requirements, and byte encoding.
- github.com/dchest/tweetnacl-js/blob/1.0.3/nacl.d.ts: Types decryption failures as null and detached verification as boolean.
- diva-portal.org/smash/get/diva2%3A1805402/FULLTEXT01.pdf: Independent tests found substantially faster Ed25519 operations in libsodium.js.
- github.com/mnasyrov/cryptobench-js: Encryption results vary by runtime and message size.
- github.com/dchest/tweetnacl-js/issues/271: The maintainer describes stricter signature verification as a breaking change.
Holds up over time3.1
Will it still be a good choice in two years?
Claude Opus 5.5: 3.0, likely 2.0 to 4.0
The last release was 1.0.3 in February 2020, with no commits in the last year and one maintainer. In 2024 the maintainer called it finished, with bug-fix-only upkeep, and recommended WASM libsodium or WebCrypto instead. Its stability means nothing will break, but the ecosystem is moving to noble and native WebCrypto.
- github latestRelease: 1.0.3 on 2020-02-10, no releases or commits in the last year
- github.com/dchest/tweetnacl-js/issues/253: Maintainer: finished software; recommends WASM libsodium or WebCrypto
- scorecard Maintained: Maintained check scores 0
GPT-6.2 Sol: 3.1, likely 2.0 to 4.6
The project had no commits or releases in the snapshot year, and ecosyste.ms lists one npm maintainer. The maintainer discussed stricter verification in 2026 but expressed reluctance to build 2.0, which has no milestone. The small, stable API may stay useful for NaCl compatibility, while the long release gap makes future fixes hard to count on.
- github.commitsLastYear and github.releasesLastYear: Zero commits and zero releases in the past year.
- summary.ecosyste.ms/projects/372937: One listed npm maintainer and a long release gap.
- github.com/dchest/tweetnacl-js/issues/271: Open 2.0 proposal with no milestone or implementation.
- peers: libsodium.js and noble-curves both had recent releases and substantial commit activity.
Used widely5.8
How many use it, and is that growing?
Claude Opus 5.5: 5.0, likely 4.0 to 6.0
It has about 202M downloads in four weeks and 924k dependent repositories, but most come in through other packages such as sshpk and Solana web3 libraries. Downloads doubled over the year, a ratio of 2.0 against a median of 4.1, so it is losing ground. Few new projects choose it directly, and attention on Hacker News and Bluesky is close to zero.
- npm downloadsLast4Weeks: 201.9M now vs 101.5M a year ago, ratio 2.0 below median 4.1
- dependents repos: 923,630 repositories, mostly transitive
- bluesky posts: 1 post with no engagement
- sshpk / @solana/web3.js dependency: Popular packages install it transitively
GPT-6.2 Sol: 6.6, likely 5.1 to 7.9
Ecosyste.ms counts about 924,000 dependent repositories and 2,661 packages, with only Forge ahead on repository count among the listed peers. Downloads rose from 101.5 million to 201.9 million, but the 1.99× ratio was the lowest in the group and well below the 4.1× catalog median. Older versions still account for substantial npm traffic through dependencies such as sshpk, while bundled copies can escape npm counts. The share of fresh installs that reflect a direct choice remains uncertain.
- dependents and peers: Second-highest indexed repository count in the peer group.
- npm.downloadsLast4Weeks, npm.downloadsSame4WeeksYearAgo and medianDownloadsRatio: 1.99× year-over-year growth versus the 4.1× catalog median.
- npmjs.com/package/tweetnacl?activeTab=versions: The version breakdown shows 0.14.5 outdrawing 1.0.3.
- github.com/TritonDataCenter/node-sshpk/blob/master/package.json: sshpk still declares a dependency on the 0.14 series.
- docs.cryptpad.org/en/admin_guide/installation.html: CryptPad documents use on the client and server.
Vouched for5.6
Who stands behind it being good?
Claude Opus 5.5: 5.0, likely 4.0 to 6.0
Cure53 audited it independently, and many well-known projects have shipped it in production. But the audit dates from 2017, and its own maintainer now recommends other tools. Current independent endorsements favour noble, libsodium and WebCrypto.
- github.com/dchest/tweetnacl-js: Cure53 audit in 2017 found no security problems
- github.com/github/tweetsodium: GitHub deprecated its tweetnacl-based package in favour of libsodium.js
- best-of-web.builder.io/library/dchest/tweetnacl-js: Comparison lists noble and libsodium as alternatives
GPT-6.2 Sol: 6.1, likely 4.9 to 7.2
CryptPad still uses TweetNaCl.js, though its flagship instance uses Sodium on the server for performance. Least Authority verified its adoption in Wallet V's keychain module in 2025, and Cure53's 2017 review found no issues in the code it examined. The age of that review and the lack of project-level satisfaction data in State of JavaScript limit confidence.
- docs.cryptpad.org/en/admin_guide/installation.html: Documents production use and the flagship server's Sodium substitution.
- leastauthority.com/wp-content/uploads/2025/07/Least-Authority-V-Wallet-Keychain-Module-Updated-Final-Audit-Report.pdf: Verifies adoption in the Wallet V keychain module.
- tweetnacl.js.org/audits/cure53.pdf: Independent 2017 source review found no issues in its scope.
- 2025.stateofjs.com/en-US/libraries: The survey supplies no TweetNaCl.js satisfaction measure.
Safe6.1
How safe is it to depend on?
Claude Opus 5.5: 7.0, likely 6.0 to 8.0
It has no dependencies and no advisories, the code has been audited and has not changed since 2020, and the licence is permissive. The OpenSSF Scorecard is weak at 2.3: there is no security policy, no branch protection and no signed releases. One person can publish, and a dormant package with huge transitive reach is a takeover target. JavaScript also gives no side-channel guarantees.
- npm dependencies: 0 dependencies
- advisories total: No known advisories
- scorecard score: 2.3: no security policy, branch protection, SAST or fuzzing
- npm license: Unlicense, public domain
GPT-6.2 Sol: 5.1, likely 3.8 to 6.5
The Unlicense permits commercial use, and zero runtime dependencies limit supply-chain exposure. OSV lists zero advisories, and 1.0.3 fixed an incorrect-signature bug, but a 2025 downstream audit flagged signature malleability that remains in the release. OpenSSF scores it 2.3 out of 10, with weak code review, no detected security policy or branch protection, and one listed npm maintainer. The practical risk depends on the protocol's requirements and how quickly a future fix could ship.
- npm.dependencies, npm.license and advisories.total: Zero runtime dependencies, Unlicense, and zero indexed advisories.
- scorecard: 2.3 overall, with weak review and zero for security policy, branch protection, and fuzzing.
- github.com/dchest/tweetnacl-js/releases/tag/1.0.3: Documents the fix for incorrect signature generation.
- cure53.de/pentest-report_influx-wallet.pdf: The 2025 downstream audit flags signature malleability.
- summary.ecosyste.ms/projects/372937: Lists a single maintainer for the npm package.
Good
- Zero dependencies, a tiny API and pure JavaScript that runs in any browser or Node version.
- Cure53 audited it in 2017 and found no security problems, and it has no advisories on record.
- The API has stayed the same since 1.0, so upgrades do not break code.
- The Unlicense (public domain) puts no limits on commercial use.
Bad
- There has been no release since February 2020, and the maintainer describes it as finished software with bug-fix-only maintenance.
- It does no password hashing and offers no modern AEAD such as XChaCha20-Poly1305 with associated data.
- Ed25519 signatures can be altered without the key, and that fix is deferred to a 2.0 that may never ship.
- It is slower than noble, WASM libsodium or the native WebCrypto Ed25519 and X25519 now in browsers and Node.
The numbers
- npm downloads, 4 weeks
- 202M +99% in a year
- GitHub stars
- 1.9k
- Commits, 12 months
- 0
- npm version
- 1.0.3 Feb 2020
- Versions, 12 months
- 0
- Advisories, 24 months
- 0 of 0 ever
- OpenSSF Scorecard
- 2.3 out of 10, Nov 2026
- Licence
- Unlicense
Read on 21 November 2026 from GitHub (dchest/tweetnacl-js), npm (tweetnacl), OSV and the OpenSSF Scorecard.
Cryptography and password hashing
- 8.2noble-curves
- 8.1noble-hashes
- 7.8node-argon2
- 7.4libsodium.js
- 6.5hash-wasm
- 6.2bcrypt.js
- 5.4node.bcrypt.js
- 4.9Forge
- 4.5TweetNaCl.js
- 1.7crypto-js