
Product
Rust Support Now in Beta
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
@blindflare/fortress
Advanced tools
Advanced cryptographic service with AES-256-GCM, ECC encryption, and session management
Modular implementation of core Blindflare protocol primitives (handshake, envelopes, symmetric + hybrid crypto, sessions & signatures) in TypeScript. Works in Node (>=16) and modern browsers (WebCrypto fallback) – hex‑only, zero PEM fuss.
npm install @blindflare/fortress
# or pnpm add @blindflare/fortress
import blindflare, { Fortress } from '@blindflare/fortress';
// Singleton
const key = blindflare.generateKey();
const enc = blindflare.encrypt('hello', key);
const dec = blindflare.decrypt(enc, key);
// Custom instance & session
const svc = new Fortress();
const session = svc.generateSessionKey({ user: 'alice', expirationMinutes: 60 });
const key = blindflare.generateKey(); // hex
const payload = { secret: true };
const encrypted = blindflare.encrypt(JSON.stringify(payload), key);
const decrypted = JSON.parse(blindflare.decrypt(encrypted, key));
const { publicKey, privateKey } = blindflare.generateKeyPair();
const encECC = blindflare.encryptWithECC('top secret', publicKey);
const plain = blindflare.decryptWithECC(encECC, privateKey);
const { publicKey, privateKey } = blindflare.generateKeyPair();
const sig = blindflare.signData('message', privateKey);
const ok = blindflare.verifySignature('message', sig, publicKey);
const sessionKey = blindflare.generateSessionKey({ user: 'alice', expirationMinutes: 120 });
const token = blindflare.createSessionToken(sessionKey, { role: 'admin' });
const claims = blindflare.verifySessionToken(token, sessionKey);
import type { BlindflareMeta } from '@blindflare/fortress';
const meta: BlindflareMeta = { type: 'TRANSACTION', version: '1.0.0' };
const payload = { amount: 42 };
// Symmetric
const tx = blindflare.encryptTransaction(payload, key, meta);
const obj = blindflare.decryptTransaction<typeof payload>(tx, key);
// ECC hybrid
const { publicKey, privateKey } = blindflare.generateKeyPair();
const txECC = blindflare.encryptTransactionWithECC(payload, publicKey, meta);
const objECC = blindflare.decryptECCTransaction<typeof payload>(txECC, privateKey);
Wrap arbitrary JSON with deterministic AAD context (kid, nonce, ts, type) for tamper‑resistant transport.
const envelope = blindflare.createEnvelope({ ver: '1', kid: 'abcd1234', ts: Date.now(), nonce: 'ff00aa', type: 'TX' }, { foo: 'bar' }, key);
const opened = blindflare.openEnvelope(envelope, key);
const { hash, salt } = blindflare.hashData('password123');
const ok = blindflare.verifyHash('password123', hash, salt);
interface EncryptedData { data: string; iv: string; tag?: string; }
interface EncryptedECCData extends EncryptedData { ephemeralPublicKey: string; }
interface SessionKey { id: string; key: string; sessionId: string; createdAt: Date; expiresAt: Date; isActive: boolean; user?: string; }
crypto.createHash
unavailable.bun test
MIT © Sierra
Made with ⚔️ & caffeine.
FAQs
Advanced cryptographic service with AES-256-GCM, ECC encryption, and session management
The npm package @blindflare/fortress receives a total of 48 weekly downloads. As such, @blindflare/fortress popularity was classified as not popular.
We found that @blindflare/fortress 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.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.