Security News
New Python Packaging Proposal Aims to Solve Phantom Dependency Problem with SBOMs
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
@dashlane/pqc-kem-firesaber-browser
Advanced tools
JavaScript wrapper generator of WebAssembly builds of each round-3 finalists of NIST Post-Quantum Cryptography Competition
This project provides JS bindings and playground of post-quantum asymmetric cipher compiled to WebAssembly using emscripten with a fallback in plain JS.
The available methods are the finalists (and alternate candidates) of NIST Post-Quantum Cryptography Competition:
The C implementations used to create the bindings are the clean
versions provided by PQClean.
This project has been inspired by ntru.js that used to provide an NTRU JS binding.
It is possible to test the bindings, to compare them in real-world conditions on this playground.
Pre-built bindings are available on the playground.
sudo apt install emscripten
npm ci
make clean
make kem-<the KEM algorithm you want to build>
or make sign-<the signature algorithm you want to build>
make all
The output directory is docs/bin/
and each output binding is made of a JS module and its associated WebAssembly file,
a browser package, and a node package.
import kemBuilder from 'pqc-kem-<algoName>.js'
async function run() {
const kem = await kemBuilder();
const { publicKey, privateKey } = await kem.keypair();
const { ciphertext, sharedSecret: sharedSecretA } = await kem.encapsulate(publicKey);
const { sharedSecret: sharedSecretB } = await kem.decapsulate(ciphertext, privateKey);
// sharedSecretA === sharedSecretB
}
run();
import signBuilder from 'pqc-sign-<algoName>.js'
async function run() {
const sign = await signBuilder();
const message = new Uint8Array([0x44, 0x61, 0x73, 0x68, 0x6c, 0x61, 0x6e, 0x65]);
const { publicKey, privateKey } = await sign.keypair();
const { signature } = await sign.sign(message, privateKey);
const validSignature = await sign.verify(signature, message, publicKey);
// validSignature === true
}
run();
The first optional parameter of the builders is set to true
is you want to disable WebAssembly execution.
If it is set to false, the fallback JavaScript may still be used if the WebAssembly fails.
The second optional parameter of the builders is the path to the WebAssembly file.
crypto.randomBytes
.SHA-2
and AES
implementations are provided by SubtleCrypto that is an implementation of Web Crypto API. This may
slow down the execution of the bindings because of the asynchronous calls to SubtleCrypto, even more when AES-ECB is
used because in this case AES-CTR is called for each block.SHA-2
PQClean implementation is still used by sphincs-sha256-*
bindings because they are using incremental version
of sha256
that do not exist in Web Crypto API.SHA-3
PQClean implementation is still used by NTRU, Kyber, SABER, FrodoKEM and McEliece-Classic because there are no
implementations in Web Crypto API.FAQs
JavaScript wrapper generator of WebAssembly builds of each round-3 finalists of NIST Post-Quantum Cryptography Competition
The npm package @dashlane/pqc-kem-firesaber-browser receives a total of 0 weekly downloads. As such, @dashlane/pqc-kem-firesaber-browser popularity was classified as not popular.
We found that @dashlane/pqc-kem-firesaber-browser demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers 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
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Security News
Socket CEO Feross Aboukhadijeh discusses open source security challenges, including zero-day attacks and supply chain risks, on the Cyber Security Council podcast.
Security News
Research
Socket researchers uncover how threat actors weaponize Out-of-Band Application Security Testing (OAST) techniques across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.