Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ronomon/crypto-async

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ronomon/crypto-async - npm Package Compare versions

Comparing version 4.0.0 to 5.0.0

10

common.js

@@ -74,12 +74,2 @@ const Node = {

var ivSize = algorithm.ivSize;
if (aead) {
ivSize = Math.ceil(random() * algorithm.ivSize);
// For ChaCha20-Poly1305, GCM and OCB, all with 12-byte IVs, this can
// test the upper limit of 16-bytes, 16-bytes and 15-bytes respectively:
// We disabled this test when it discovered the ChaCha20-Poly1305 CVE.
// Our binding now prohibits more than 96-bits for any of these ciphers.
// if (algorithm.ivSize === 12 && random() < 0.5) {
// ivSize += (/-ocb$/i.test(algorithm.name) ? 3 : 4);
// }
}
var sourceSize = randomSize();

@@ -86,0 +76,0 @@ var targetSize = sourceSize + CIPHER_BLOCK_MAX;

2

package.json
{
"name": "@ronomon/crypto-async",
"version": "4.0.0",
"version": "5.0.0",
"description": "Fast, reliable cipher, hash and hmac methods executed in Node's threadpool for multi-core throughput.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -481,3 +481,3 @@ # @ronomon/crypto-async

* [CVE-2019-1543: chacha20-poly1305 fails to detect IV tampering, where IV > 12 and IV <= CHACHA_CTR_SIZE](https://github.com/openssl/openssl/issues/8345)
* [CVE-2019-1543: chacha20-poly1305 fails to detect IV tampering, where IV > 12 and IV <= CHACHA_CTR_SIZE](https://www.openssl.org/news/secadv/20190306.txt)

@@ -484,0 +484,0 @@ * [EVP_CTRL_AEAD_SET_TAG fails for OCB](https://github.com/openssl/openssl/issues/8331)

@@ -328,24 +328,22 @@ var assert = require('assert');

]);
if (method === 'cipher' && key === 'keySize') {
check('E_KEY_INVALID', [0, algorithm.keySize - 1]);
}
if (key === 'ivSize') {
check('E_IV_INVALID', [0]);
if (algorithm.tagSize === 0) {
check('E_IV_INVALID', [algorithm.ivSize - 1]);
if (method === 'cipher') {
if (key === 'keySize') {
check('E_KEY_INVALID', [0, algorithm.keySize - 1]);
}
}
if (key === 'aadSize') {
if (algorithm.tagSize === 0) {
check('E_AAD_INVALID', [2]);
if (key === 'ivSize') {
check('E_IV_INVALID', [0, algorithm.ivSize - 1]);
}
}
if (key === 'tagSize') {
if (algorithm.tagSize) {
check('E_TAG_INVALID', [0]);
} else {
check('E_TAG_INVALID', [1]);
if (key === 'aadSize') {
if (algorithm.tagSize === 0) {
check('E_AAD_INVALID', [2]);
}
}
if (key === 'tagSize') {
if (algorithm.tagSize) {
check('E_TAG_INVALID', [0]);
} else {
check('E_TAG_INVALID', [1]);
}
}
}
return;
}

@@ -352,0 +350,0 @@ }

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc