Gathering detailed insights and metrics for chloride
Gathering detailed insights and metrics for chloride
Gathering detailed insights and metrics for chloride
Gathering detailed insights and metrics for chloride
npm install chloride
Typescript
Module System
Node Version
NPM Version
58.3
Supply Chain
70.1
Quality
81
Maintenance
100
Vulnerability
99.1
License
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
90 Stars
352 Commits
17 Forks
11 Watching
2 Branches
27 Contributors
Latest Version
2.4.1
Package Id
chloride@2.4.1
Size
4.01 kB
NPM Version
6.14.11
Node Version
14.7.0
Publised On
30 Jan 2021
Cumulative downloads
Total Downloads
Last day
0%
0
Compared to previous day
Last week
0%
0
Compared to previous week
Last month
0%
0
Compared to previous month
Last year
0%
0
Compared to previous year
1
1
Chloride is a Cryptography Library (Cl) for javascript enviroments.
Chloride descends from Dan J. Bernstein's (djb) 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) weren'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.
We have wrapped and tested enough functions for our 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 verifying many signatures, performance may be a problem. Bear in mind that an asymetric operation (sign
, verify
, scalarmult
, keygen
) is usually 50 times slower than a symmetric operation, for instance a hash.
See sodiumperf performance comparisons.
To run Chloride in performance mode, load it like this:
1const chloride = require('chloride')
To run in low size mode:
1const chloride = require('chloride/small')
This only applies to enviroments that only support JavaScript. If you are running this on the server and could compile libsodium, 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 2024-12-23
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