client-side-encryption

Encrypt user data client-side with AES-256-GCM and PBKDF2 in SvelteKit.

Updated Jan 12, 2026
One-click install
npx skills add https://github.com/onichandame/zapdo --skill client-side-encryption
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: client-side-encryption
Source: https://github.com/onichandame/zapdo/tree/main/.opencode/skill/client-side-encryption
Command: npx skills add https://github.com/onichandame/zapdo --skill client-side-encryption

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill enables enterprise-grade zero-knowledge client-side encryption for SvelteKit applications, ensuring plaintext data never leaves the client and servers cannot decrypt user information.

Core Features & Use Cases

  • Zero-knowledge security: All cryptographic operations occur on the client, eliminating plaintext exposure on the server.
  • Key management: KEK/DEK hierarchy with PBKDF2 derivation, AES-256-GCM encryption, and RSA-OAEP authentication.
  • SvelteKit integration: Web Crypto-based primitives with browser-friendly patterns and on-demand resources; fits into Cloudflare Workers, D1, KV, and R2 workflows.
  • Use Case: Enterprises needing privacy-compliant client-side encryption for sensitive user data in modern web apps.

Quick Start

Use the client-side-encryption skill to derive KEK with PBKDF2 and encrypt a sample piece of data using AES-256-GCM in a SvelteKit context.

Frequently Asked Questions about client-side-encryption

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement zero-knowledge client-side encryption in a SvelteKit app?

Zero-knowledge client-side encryption in a SvelteKit app is implemented using the Web Crypto API to perform all cryptographic operations on the client. This ensures plaintext data never leaves the browser, preventing server access to user information.

What is a KEK/DEK hierarchy and how does it protect user data with PBKDF2?

A KEK/DEK hierarchy protects user data by deriving a Key Encryption Key from a password using PBKDF2 with 600,000+ iterations, then using it to encrypt a separate Data Encryption Key. This approach ensures deterministic key generation while AES-256-GCM encrypts the actual payload.

Does this client-side encryption approach work with Cloudflare Workers, KV, and R2?

Client-side encryption works with Cloudflare Workers, KV, and R2 by performing all encryption in the browser before transmission. SvelteKit integration uses Web Crypto-based primitives that fit into Cloudflare workflows, storing only encrypted payloads in KV and R2 storage.

Can I use AES-256-GCM and RSA-OAEP together for encrypting sensitive user data in the browser?

AES-256-GCM and RSA-OAEP are used together for encrypting sensitive user data in the browser via the Web Crypto API. AES-256-GCM handles symmetric payload encryption while RSA-OAEP manages authentication, with non-extractable keys preventing extraction from browser memory.

What are the limitations of relying on Web Crypto for enterprise-grade privacy in modern web apps?

Relying on Web Crypto for enterprise-grade privacy requires all cryptographic operations to execute on the client, meaning users must have modern browsers supporting the Web Crypto API. Servers only store encrypted data, so password recovery becomes impossible without the original credentials.