
Security News
White House Authorizes Private Companies to Conduct Offensive Cyber Operations
A new federal program will let vetted U.S. cybersecurity firms help investigate and disrupt foreign cybercrime groups under government direction.
@metamask/toprf-secure-backup
Advanced tools
@metamask/toprf-secure-backupyarn add @metamask/toprf-secure-backup
or
npm install @metamask/toprf-secure-backup
This package is part of a monorepo. Instructions for contributing can be found in the monorepo README.
This SDK handles sensitive cryptographic material including passwords, seeds, authentication tokens, and private keys.
Important: JavaScript's garbage collector provides no guarantees about when sensitive data is removed from memory. While the SDK performs best-effort cleanup internally, complete memory clearing cannot be guaranteed.
null and call array.fill(0) when done// ✅ Good: Use immediately and clear
async function decrypt(data) {
const { encKey } = await toprfBackup.recoverEncKey(params);
try {
return await processData(data, encKey);
} finally {
encKey.fill(0);
}
}
// ❌ Bad: Long-lived storage
this.encKey = result.encKey; // Persists in memory
The SDK internally clears sensitive Uint8Array data (session keys, password bytes, seeds) where possible, but JavaScript strings and BigInts cannot be reliably cleared from memory.
FAQs
The MetaMask Node module template
We found that @metamask/toprf-secure-backup demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 7 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.

Security News
A new federal program will let vetted U.S. cybersecurity firms help investigate and disrupt foreign cybercrime groups under government direction.

Research
/Security News
The campaign amassed more than 75,000 installs by targeting Russian-speaking users seeking access to blocked services.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.