Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
S

sjcl

> 编程语言
Open source

[DEPRECATED] Stanford Javascript Crypto Library

7.2K stars0 likes2 views
WebsiteGitHub

About

[DEPRECATED] Stanford Javascript Crypto Library

[DEPRECATED] sjcl

Deprecation status

Having not been updated in many years (except to fix one serious vulnerability, described below), sjcl is deprecated. Please do not use it in new projects, and consider instead a more modern alternative. Stanford Javascript Crypto Library

Security Advisories

  • 12.02.2014: the current development version has a paranoia bug in the ecc module. The bug was introduced in commit ac0b3fe0 and might affect ecc key generation on platforms without a platform random number generator.

  • 03.08.2026: According to https://gist.github.com/Kr0emer/2560f98edb10b0b34f2438cd63913c47, sjcl is vulnerable due to missing point-on-curve validation in sjcl.ecc.basicKey.publicKey(). An attacker can recover a victim's ECDH private key by sending crafted off-curve public keys and observing ECDH outputs. The dhJavaEc() function directly returns the raw x-coordinate of the scalar multiplication result (no hashing), providing a plaintext oracle without requiring any decryption feedback. This bug is fixed in SJCL 1.0.9. Thanks to Kr0emer for reporting it, and to the the Snyk security team for relaying this information.

Security Contact

Security Mail: [email protected]
OpenPGP-Key Fingerprint: 0D54 3E52 87B4 EC06 3FA9 0115 72ED A6C7 7AAF 48ED
Keyserver: pool.sks-keyservers.net

Upgrade Guide

1.0.3 -> 1.0.4

codecBase32 has been re-enabled with changes to conform to RFC 4648:

  • Padding with = is now applied to the output of fromBits. If you don't want that padding, you can disable it by calling fromBits with a second parameter of true or anything that evaluates as "truthy" in JS
  • The encoding alphabet for sjcl.codec.base32 now matches that specified by the RFC, rather than the extended hex alphabet.
  • The former extended hex alphabet is now available through sjcl.codec.base32hex (also matching the RFC). So if you encoded something with base32 before, you'll want to decode it with base32hex now.

Documentation

The documentation is available here

Issues· 118 open

View all issuesOpen on GitHub
  • #436

    Trying to encrypt using pk (elGamal ecc), but getting aes error.

    Updated Sep 17, 2026
  • #438

    Security issue: Library is vulnerable to timing attacks

    Updated Sep 7, 2026
  • #446

    ECDH doesn't verify off-curve points

    Updated Aug 27, 2026
  • #439

    不支持aes-256-gcm?

    Updated Aug 26, 2026
  • #435

    Is this project maintained?

    Updated Aug 19, 2026
  • #434

    GitHub pages link needs to be updated in top description

    Updated Aug 19, 2026
  • #440

    What was the file size used in original expirements?

    Updated Aug 17, 2026
  • #428

    CCM mode wrongly allows IV of more than 13 bytes.

    Updated Oct 10, 2025
  • #437

    unable to decrypt the encrypted messages using sjcl 256 gcm- tag mismatch error

    Updated Jun 12, 2023
  • #420

    source code of the compiler.jar

    Updated Jan 23, 2023

> Tags

JavaScript

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 22, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言