Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
This module gives you access to GpgMe librairy and its underlying GPG backend. With this module, you can :
This module is aiming at (finally!) give access to gpg key manipulation for node user respecting a couple of JS good practices like:
npm install node-gyp -g
apt-get install libgpgme11 libgpgme11-dev
brew install gpgme
Simply run npm install node-gpgme
. Make sure you have the requirements installed correctly.
The configuration objects allows you to specify the path of the keyring to use, if armored is to be used and the backend engine you want to use (so far, we only support OpenPGP).
var GpgMe = require('gpgme')
var gpgme = new GpgMe({armored: true, keyring_path: '/tmp'});
So far, you can only add a key (public or secret) and list those keys. Simple.
var s = "-----BEGIN PGP PUBLIC KEY BLOCK ..."
var fingerprint = gpgme.importKey(s)
if (fingerprint === false) {
console.log("Couldn't import key.")
} else {
console.log("Key fingerprint :" + fingerprint);
}
var keys = gpgme.listKeys();
console.log(keys[0]);
{ fingerprint: '3B2302E57CC7AA3D8D4600E89DAC32BD82A1C9DC',
email: 'sebastien@requiem.fr',
name: 'Sebastien Requiem',
revoked: false,
expired: false,
disabled: false,
invalid: false,
can_encrypt: true,
secret: false }
You can cipher a message to one recipient at a time for the moment bu using the fingerprint of the key previously retrieved.
var fingerprint = '3B2302E57CC7AA3D8D4600E89DAC32BD82A1C9DC';
var message = "Can you read this ?";
var cipher = gpgme.cipher(fingerprint, message);
-----BEGIN PGP MESSAGE-----
Version: GnuPG v2
hQEMA7xBZ+vX1VJHAQf/QpzEn8jwgWcuEgP/kF+NoihSOz5PDQbrf52EgykSajF4
XipaoqnceMrZpwkWTF9yZGcvCyMAX0pgiKNlThHloHsLkTjjq3L6/KFWk0odpG+C
UMer5X6yQsIjLsYGcWU2W8Qb6x4giX/v/yL4DGy6TYRb9tKf4r+0i2BD/1PrB2eN
qXhz6RFmbZg4qWjozyg2CYo5Bz2HDmF/mciRnejP/THCGKKmbf45LAZsS37Y07d6
cb35+YG0anwU/qZHDnrDsqlHTQ7+rdJui6KXobJpikAa873mziaqunDykl7Fve3l
26SzxiWhvgxk2+mhIW+syobFalLZCI40+ryAHvumhNJDATMw3MfGeZnBnRYZu+Ay
9EXXFCVn9A86Gli2B5gyYVk8kbAadfXAd8Vj+ysPw0in/HGoUH/NTDUp/C/SN4Nl
L4KxYQ==
=ACDC
-----END PGP MESSAGE-----
So far, this module not respecting the nature of node when fetching keys or encrypting large payload. If you have 1000 keys in your keyring, except things to block long enough to be noticed. Same goes for large messages to cipher.
As this is a very early release coded in few days only, I tried my best to deallocate memory blocks when possible but expect this module to leak for now.
FAQs
GpgMe bindings
We found that node-gpgme demonstrated a not healthy version release cadence and project activity because the last version was released 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
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.