Browser-first AES-256-GCM primitives for zero-knowledge file-transfer links.
This package contains only cryptographic helpers. It does not include FilmProcessor's upload manager, download manager, presigned URL flow, account metadata, billing, recovery, server APIs, or product UI.
npm install @filmprocessor/fileshare-cryptoimport {
generateTransferKey,
createBaseIV,
encryptChunk,
decryptChunk,
createKeyFragment,
} from "@filmprocessor/fileshare-crypto";
const { key, keyRaw } = await generateTransferKey();
const baseIV = createBaseIV();
const encrypted = await encryptChunk(keyRaw, baseIV, 0, plaintextBytes);
const decrypted = await decryptChunk(keyRaw, baseIV, 0, encrypted);
const urlFragment = createKeyFragment(key);- AES-256-GCM via the Web Crypto API.
- 96-bit base IVs.
- Per-chunk IV derivation by XORing the last 32 bits of the base IV with the zero-based chunk index.
- URL fragment helper for sharing keys out-of-band from HTTP requests.
This is not a complete secure file-transfer application. A safe application still needs authenticated metadata, upload integrity, expiry behavior, access control, abuse handling, and recovery logic.
This package has not yet received a third-party cryptography audit.
Apache-2.0. See LICENSE.
Version 0.2.0 adopts Apache License 2.0 for this project. Earlier published
versions through 0.1.0 retain their MIT licence. Third-party dependencies
retain their own licences. See LICENSE and NOTICE.