
Research
/Security News
Fake imToken Chrome Extension Steals Seed Phrases via Phishing Redirects
Mixed-script homoglyphs and a lookalike domain mimic imToken’s import flow to capture mnemonics and private keys.
@turnkey/crypto
Advanced tools
This package consolidates some common cryptographic utilities used across our applications, particularly primitives related to keys, encryption, and decryption in a pure JS implementation. For react-native you will need to polyfill our random byte generation by importing react-native-get-random-values: https://www.npmjs.com/package/react-native-get-random-values
import 'react-native-get-random-values'
Example usage (Hpke E2E):
const senderKeyPair = generateP256KeyPair();
const receiverKeyPair = generateP256KeyPair();
const receiverPublicKeyUncompressed = uncompressRawPublicKey(
uint8ArrayFromHexString(receiverKeyPair.publicKey),
);
const plainText = "Hello, this is a secure message!";
const plainTextBuf = textEncoder.encode(plainText);
const encryptedData = hpkeEncrypt({
plainTextBuf: plainTextBuf,
encappedKeyBuf: receiverPublicKeyUncompressed,
senderPriv: senderKeyPair.privateKey,
});
// Extract the encapsulated key buffer and the ciphertext
const encappedKeyBuf = encryptedData.slice(0, 33);
const ciphertextBuf = encryptedData.slice(33);
const decryptedData = hpkeDecrypt({
ciphertextBuf,
encappedKeyBuf: uncompressRawPublicKey(encappedKeyBuf),
receiverPriv: receiverKeyPair.privateKey,
});
// Convert decrypted data back to string
const decryptedText = new TextDecoder().decode(decryptedData);
FAQs
Encryption, decryption, and key related utility functions
The npm package @turnkey/crypto receives a total of 96,339 weekly downloads. As such, @turnkey/crypto popularity was classified as popular.
We found that @turnkey/crypto demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 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.

Research
/Security News
Mixed-script homoglyphs and a lookalike domain mimic imToken’s import flow to capture mnemonics and private keys.

Security News
Latio’s 2026 report recognizes Socket as a Supply Chain Innovator and highlights our work in 0-day malware detection, SCA, and auto-patching.

Company News
Join Socket for live demos, rooftop happy hours, and one-on-one meetings during BSidesSF and RSA 2026 in San Francisco.