Gathering detailed insights and metrics for @streamplace/chloride
Gathering detailed insights and metrics for @streamplace/chloride
Gathering detailed insights and metrics for @streamplace/chloride
Gathering detailed insights and metrics for @streamplace/chloride
npm install @streamplace/chloride
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
90 Stars
352 Commits
17 Forks
10 Watchers
2 Branches
27 Contributors
Updated on Apr 12, 2023
Latest Version
2.2.12
Package Id
@streamplace/chloride@2.2.12
Unpacked Size
9.13 kB
Size
4.32 kB
File Count
14
NPM Version
6.2.0
Node Version
10.2.1
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
Chloride is a Cryptography Library (Cl) for javascript enviroments.
Chloride decends from Dan J. Bernstein's NaCl library ("Networking And Cryptography Library", not to be confused with the other NaCl, google's Native Client) djb wrote nacl, but did not maintain it, some ideas in the library (in particular the networking part) wasn't really fully baked, and the best parts where taken and maintained as libsodium (although "Na" represents the element sodium, so they took the wrong part of the acronym)
chloride is a compatibility layer that gives you bindings to libsodium when used in node.js, and either the libsodium-wrappers which is libsodium compiled to javascript via emscripten if performance is important but code size isn't. Or, if you are not doing many crypto operations, it uses tweetnacl, which is a handwritten port, and 1/10 the size of libsodium-wrappers.
I have wrapped and tested enough functions for my crypto modules to work.
This is probably everything you need, nacl doesn't have a very large api, so this is probably everything.
nacl was written with performance in mind, unfortunately a lot of that is lost when you compile it to javascript. However, chloride still has the fastest javascript elliptic curve signature that I am aware of. (and asymmetric crypto is much slower than symmetric, so this is always the weak point)
If you are only doing a symmetric ciphers (crypto_box) or a signature or two, then performance is probably not a problem. If you are veryify many signatures, performance may be a problem. Bear in mind that an asymetric operation (sign, verify, scalarmult, keygen) are usually 50 times slower than a symmetric operation, say a hash.
See sodiumperf performance comparisons.
to run chloride in performance mode, load via
1var chloride = require('chloride')
to run in low size mode
1var chloride = require('chloride/small')
This only applies to enviroments that only support javascript. If you are running this on the server and could compile sodium, then you have the same fast crypto either way.
MIT
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 existing vulnerabilities detected
Reason
Found 9/23 approved changesets -- score normalized to 3
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More