# TweetNaCl.js: 4.5 out of 10

Keep, but not for new work. 9th of 10 in [Cryptography and password hashing](https://elestia.ai/opensource/crypto/index.md).

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

- **Overall: 4.5** (likely 3.5 to 5.6)
  - Claude Opus 5.5 (4.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.
  - GPT-6.2 Sol (5.0): 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.
- **Needed by many: 4.1** (likely 3.1 to 5.2)
  - Claude Opus 5.5 (4.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.
  - GPT-6.2 Sol (4.2): 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.
- **Helps a lot: 5.7** (likely 4.7 to 6.8)
  - Claude Opus 5.5 (5.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.
  - GPT-6.2 Sol (6.4): 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.
- **Holds up over time: 3.1** (likely 2.0 to 4.3)
  - Claude Opus 5.5 (3.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.
  - GPT-6.2 Sol (3.1): 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.
- **Used widely: 5.8** (likely 4.6 to 7.0)
  - Claude Opus 5.5 (5.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.
  - GPT-6.2 Sol (6.6): 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.
- **Vouched for: 5.6** (likely 4.5 to 6.6)
  - Claude Opus 5.5 (5.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.
  - GPT-6.2 Sol (6.1): 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.
- **Safe: 6.1** (likely 4.9 to 7.3)
  - Claude Opus 5.5 (7.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.
  - GPT-6.2 Sol (5.1): 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.

## 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

- Downloads, 4 weeks: 202M
- In a year: +99%
- GitHub stars: 1.9k
- Commits, 12 months: 0
- Last npm release: Feb 2020
- Advisories, 24 months: 0
- Licence: Unlicense
- GitHub: https://github.com/dchest/tweetnacl-js
- npm: https://www.npmjs.com/package/tweetnacl

Scores run from 0 to 10 and are the mean of the scores of AI reviewers (Claude Opus 5.5, GPT-6.2 Sol), made on 22 November 2026 from GitHub, npm, OSV, OpenSSF Scorecard, ecosyste.ms, Hacker News and Bluesky data and a web search. The ecosyste.ms count of repositories that use a project is far too low for projects that grew in the last few years, and some reviews quote it. Overall is the reviewers' own judgement for a new project today, not an average of the parts. An AI wrote them and can be wrong.
