Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
@47ng/simple-e2ee
Advanced tools
@47ng/simple-e2ee
Simple end-to-end encryption for web apps. Inspired from Excalidraw and Firefox Send (RIP).
You encrypt your data in the browser, send the encrypted data to a server, and use the hash part of the URL (which never hits the server) to share the key with someone else.
On the other side, the recipient obtains the key from the URL, the payload from the server and decrypts the data.
This library does not handle any of the server upload/download side, it's up to you. It only deals with encryption, decryption and moving keys in and out of URLs.
$ yarn add @47ng/simple-e2ee
# or
$ npm i @47ng/simple-e2ee
import {
encrypt,
decrypt,
applyKeyToURL,
getKeyFromURL,
generateKey
} from '@47ng/simple-e2ee'
// Before sending data to the server, encrypt it:
const { payload, key } = encrypt(
"whatever you want, as long as it's JSON-serialisable"
)
// Upload `payload` to the server
// Stick the key onto the current URL:
const shareURL = applyKeyToURL(key)
// Optionally, apply the key to another URL
// (example, with an ID returned from the server):
const shareURL = applyKeyToURL(key, `https://example.com/share/${id}`)
// On the other side, get the key from the current URL,
// and the payload from the server:
const key = getKeyFromURL()
const message = decrypt(payload, key)
// Optionally, obtain the key from any URL:
const key = getKeyFromURL(
`https://example.com/share/foo#KatLceVEOM2znzX_FGPKu6Zz1adWkhlq9b2R9WRjUsM=`
)
// Encrypt related pieces of content with the same key:
const payload = encrypt('some more data', key)
// Generate a key for later use:
const key = generateKey()
MIT - Made with ❤️ by François Best.
Using this package at work ? Sponsor me to help with support and maintenance.
FAQs
Simple E2EE for web apps
We found that @47ng/simple-e2ee 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.
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.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.