
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
A secure message encryption and signing package using Ed25519 for signing and X25519 for encryption
A secure message encryption and signing package using Ed25519 for signing and X25519 for encryption.
npm install vericrypt
const { generateKeyPair } = require('vericrypt');
// Generate key pairs for both signing and encryption
const keys = generateKeyPair();
// Ed25519 keys for signing/verification
console.log('Signing Private Key:', keys.signingPrivateKey);
console.log('Signing Public Key:', keys.signingPublicKey);
// X25519 keys for encryption/decryption
console.log('Encryption Private Key:', keys.encryptionPrivateKey);
console.log('Encryption Public Key:', keys.encryptionPublicKey);
const { sign } = require('vericrypt');
const message = 'Hello, World!';
const signingPrivateKey = keys.signingPrivateKey;
// Sign the message (synchronous operation)
const signedData = sign(message, signingPrivateKey);
console.log('Message:', signedData.message);
console.log('Signature:', signedData.signature);
const { verify } = require('vericrypt');
const signingPublicKey = keys.signingPublicKey;
// Verify the signed message (synchronous operation)
const isValid = verify(signedData, signingPublicKey);
if (isValid) {
console.log('Signature is valid');
} else {
console.log('Signature is invalid');
}
const { encrypt } = require('vericrypt');
const message = 'Hello, World!';
const receiverEncryptionPublicKey = recipientKeys.encryptionPublicKey;
// Encrypt the message
const encryptedData = encrypt(message, receiverEncryptionPublicKey);
console.log('Encrypted Message:', encryptedData.encryptedMessage);
console.log('Nonce:', encryptedData.nonce);
console.log('Ephemeral Public Key:', encryptedData.ephemeralPublicKey);
const { decrypt } = require('vericrypt');
const receiverEncryptionPrivateKey = recipientKeys.encryptionPrivateKey;
// Decrypt the message
const decryptedMessage = decrypt(encryptedData, receiverEncryptionPrivateKey);
if (decryptedMessage) {
console.log('Decrypted Message:', decryptedMessage);
} else {
console.log('Decryption failed');
}
const { generateKeyPair, sign, verify, encrypt, decrypt } = require('vericrypt');
// Generate random key pairs for sender and receiver
const senderKeys = generateKeyPair();
const receiverKeys = generateKeyPair();
const message = 'Hello, World!';
// 1. Sign the message with sender's signing key
const signedData = sign(message, senderKeys.signingPrivateKey);
// 2. Encrypt the signed message with receiver's encryption key
const encryptedData = encrypt(signedData.message, receiverKeys.encryptionPublicKey);
// 3. Decrypt the message with receiver's decryption key
const decryptedMessage = decrypt(encryptedData, receiverKeys.encryptionPrivateKey);
// 4. Verify the signature with sender's verification key
const isValid = verify({
message: decryptedMessage,
signature: signedData.signature
}, senderKeys.signingPublicKey);
if (isValid && decryptedMessage === message) {
console.log('Message successfully decrypted and verified!');
}
generateKeyPair()Generates a new random keypair for both signing and encryption.
{
signingPrivateKey: string,
signingPublicKey: string,
encryptionPrivateKey: string,
encryptionPublicKey: string
}
sign(message, signingPrivateKey)Signs a message using Ed25519.
message (string): Message to signsigningPrivateKey (string): Base64-encoded Ed25519 private key{message: string, signature: string}verify(signedData, signingPublicKey)Verifies a signed message using Ed25519.
signedData (object): {message: string, signature: string}signingPublicKey (string): Base64-encoded Ed25519 public keybooleanencrypt(message, receiverEncryptionPublicKey)Encrypts a message using X25519.
message (string): Message to encryptreceiverEncryptionPublicKey (string): Base64-encoded X25519 public key{encryptedMessage: string, nonce: string, ephemeralPublicKey: string}decrypt(encryptedData, receiverEncryptionPrivateKey)Decrypts a message using X25519.
encryptedData (object): {encryptedMessage: string, nonce: string, ephemeralPublicKey: string}receiverEncryptionPrivateKey (string): Base64-encoded X25519 private keystring | null - Decrypted message or null if decryption failstweetnacl - Proven cryptographic library for Ed25519 and X25519tweetnacl-util - Utility functions for tweetnaclISC
FAQs
A secure message encryption and signing package using Ed25519 for signing and X25519 for encryption
The npm package vericrypt receives a total of 0 weekly downloads. As such, vericrypt popularity was classified as not popular.
We found that vericrypt demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.