Security News
JSR Working Group Kicks Off with Ambitious Roadmap and Plans for Open Governance
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
The missing crypto module for Node.js. Bcrypto provides you with a consistent interface across Node.js and the browser. It is implemented as a Node.js addon for C libraries libtorsion (with support for openssl and libgmp) and libsecp256k1 with corresponding implementations in JavaScript.
const random = require('bcrypto/lib/random');
const entropy = random.randomBytes(32);
const hash256 = require('bcrypto/lib/hash256');
const digest = hash256.digest(Buffer.alloc(32, 0x00));
See the ./lib
directory for available modules and APIs.
nodejs (linux) | nodejs (macos) | nodejs (win) | browser | |
---|---|---|---|---|
aead | c (libtorsion¹) | c (libtorsion¹) | c (libtorsion¹) | js |
aes | c (openssl) | c (openssl) | c (openssl) | js |
bcrypt | js | js | js | js |
blake2b{160,256,384,512} | c (libtorsion) | c (libtorsion) | c (libtorsion) | js |
blake2s{128,160,224,256} | c (libtorsion) | c (libtorsion) | c (libtorsion) | js |
bn | js w/ bigint | js w/ bigint | js w/ bigint | js |
chacha20 | c (libtorsion¹) | c (libtorsion¹) | c (libtorsion¹) | js |
cshake{128,256} | c (libtorsion¹) | c (libtorsion¹) | c (libtorsion¹) | js |
ctr-drbg | js | js | js | js |
dsa | c (libtorsion²) | c (libtorsion²) | c (libtorsion) | js |
eb2k | js | js | js | js |
ecies | c (libtorsion¹) | c (libtorsion¹) | c (libtorsion¹) | js |
ed25519 | c (libtorsion) | c (libtorsion) | c (libtorsion) | js |
ed448 | c (libtorsion) | c (libtorsion) | c (libtorsion) | js |
gost94 | c (libtorsion) | c (libtorsion) | c (libtorsion) | js |
hash160 | c (libtorsion³) | c (libtorsion³) | c (libtorsion) | js |
hash256 | c (libtorsion³) | c (libtorsion³) | c (libtorsion) | js |
hash-drbg | js | js | js | js |
hkdf | js | js | js | js |
hmac-drbg | js | js | js | js |
keccak/sha3{224,256,384,512} | c (libtorsion¹) | c (libtorsion¹) | c (libtorsion¹) | js |
kmac{128,256} | c (libtorsion¹) | c (libtorsion¹) | c (libtorsion¹) | js |
md{2,4,5} | c (libtorsion) | c (libtorsion) | c (libtorsion) | js |
md5sha1 | c (libtorsion) | c (libtorsion) | c (libtorsion) | js |
merkle | js | js | js | js |
mrkl | js | js | js | js |
murmur3 | c | c | c | js |
p{192,224,256,384,521} | c (libtorsion) | c (libtorsion) | c (libtorsion) | js |
pbkdf2 | c (libtorsion) | c (libtorsion) | c (libtorsion) | js |
pgp | js | js | js | js |
poly1305 | c (libtorsion) | c (libtorsion) | c (libtorsion) | js |
random | c (openssl) | c (openssl) | c (openssl) | js |
rc4 | js | js | js | js |
ripemd160 | c (libtorsion) | c (libtorsion) | c (libtorsion) | js |
rsa | c (libtorsion²) | c (libtorsion²) | c (libtorsion) | js |
rsaies | c (libtorsion¹) | c (libtorsion¹) | c (libtorsion¹) | js |
salsa20 | c (libtorsion¹) | c (libtorsion¹) | c (libtorsion¹) | js |
schnorr | c (libtorsion) | c (libtorsion) | c (libtorsion) | js |
scrypt | c (libtorsion) | c (libtorsion) | c (libtorsion) | js |
secp256k1 | c (libsecp256k1⁴) | c (libsecp256k1⁴) | c (libsecp256k1⁴) | js |
sha1 | c (libtorsion) | c (libtorsion) | c (libtorsion) | js |
sha{256,384,512} | c (libtorsion³) | c (libtorsion³) | c (libtorsion) | js |
shake{128,256} | c (libtorsion¹) | c (libtorsion¹) | c (libtorsion¹) | js |
siphash | c (libtorsion) | c (libtorsion) | c (libtorsion) | js |
ssh | js | js | js | js |
whirlpool | c (libtorsion) | c (libtorsion) | c (libtorsion) | js |
x25519 | c (libtorsion) | c (libtorsion) | c (libtorsion) | js |
x448 | c (libtorsion) | c (libtorsion) | c (libtorsion) | js |
If you contribute code to this project, you are implicitly allowing your code
to be distributed under the MIT license. You are also implicitly verifying that
all code is your original work. </legalese>
See LICENSE for more info.
FAQs
JS crypto library
The npm package bcrypto receives a total of 9,282 weekly downloads. As such, bcrypto popularity was classified as popular.
We found that bcrypto demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
Security News
Research
An advanced npm supply chain attack is leveraging Ethereum smart contracts for decentralized, persistent malware control, evading traditional defenses.
Security News
Research
Attackers are impersonating Sindre Sorhus on npm with a fake 'chalk-node' package containing a malicious backdoor to compromise developers' projects.