xEnv: Secure Environment Secrets
XorIDA threshold splitting for .env files, API keys, and secrets. A stolen repo or compromised vault yields only a useless share — never a complete secret.
The Problem
GitHub's secret scanning detected over 10 million leaked secrets in repositories in 2024 alone. Developers store secrets in plaintext .env files, share them via Slack, and commit them accidentally. The problem is structural — secrets exist as complete values in single locations.
Traditional secret managers (Vault, AWS Secrets Manager) centralize secrets behind access control. But the secrets themselves are stored intact — if the vault is breached, every secret is exposed in one place.
Reactive scanning tools like GitHub Advanced Security find leaks after they happen. The secret was already complete, in a single location, waiting to be stolen.
The pattern is always the same: one file, one vault, one environment variable contains the complete secret. Any single compromise = full exposure.
The Old Way
The PRIVATE.ME Solution
xEnv splits every secret into K-of-N threshold shares using XorIDA over GF(2). Shares are stored in separate locations — git, vault, local device. No single location holds a complete secret. Theft of one location yields cryptographic noise.
Each secret is split at write time. The developer runs xenv split .env and shares are distributed to configured backends. The original .env is replaced with share references.
At runtime, xenv reconstruct gathers K shares from available backends and reconstructs the secrets in memory. Secrets never touch disk in plaintext during normal operation.
The security is information-theoretic: K-1 shares reveal zero information about the original secret, regardless of the attacker's computational power.
The New Way
How It Works
xEnv integrates into your existing development workflow with a CLI tool and SDK. Secrets are split once, stored across backends, and reconstructed on demand.
Use Cases
Split .env across GitHub Secrets + Vault + local. 2-of-3 threshold. New developer onboarding just needs 2 backends configured.
2-of-3Rotate secrets by generating new shares. Old shares expire atomically. Zero-downtime rotation without updating every deployment.
RotationSplit cloud provider credentials across AWS, GCP, Azure secret stores. No single cloud breach exposes cross-cloud access.
Multi-CloudSOC 2 Type II requires secrets not stored in plaintext. xEnv splits satisfy this control automatically. Auditors verify split storage, not access control quality.
ComplianceIntegration
import { splitEnv, reconstructEnv } from '@private.me/envsplit'; // Split .env file into 2-of-3 shares const shares = await splitEnv('.env', { k: 2, n: 3, backends: ['github-secrets', 'vault', 'local'] }); // shares distributed to configured backends // Reconstruct at runtime const env = await reconstructEnv({ backends: ['github-secrets', 'vault'], threshold: 2 }); console.log(env.DATABASE_URL); // Available in memory only
Security Properties
| Property | Mechanism | Guarantee |
|---|---|---|
| Secret Protection | XorIDA threshold shares | ✓ Information-theoretic |
| Integrity | HMAC-SHA256 per share | ✓ Tamper-evident |
| At-Rest Security | Split across backends | ✓ No single-point exposure |
| Rotation | Atomic share replacement | ✓ Zero-downtime |
| Quantum Resistance | GF(2) operations, no keys | ✓ Unconditional security |
Verifiable Data Protection
Every operation in this ACI produces a verifiable audit trail via xProve. HMAC-chained integrity proofs let auditors confirm that data was split, stored, and reconstructed correctly — without accessing the data itself.
Read the xProve white paper →
Ready to deploy xEnv?
Talk to Ren, our AI sales engineer, or book a live demo with our team.
Ship Proofs, Not Source
xEnv generates cryptographic proofs of correct execution without exposing proprietary algorithms. Verify integrity using zero-knowledge proofs — no source code required.
- Tier 1 HMAC (~0.7KB)
- Tier 2 Commit-Reveal (~0.5KB)
- Tier 3 IT-MAC (~0.3KB)
- Tier 4 KKW ZK (~0.4KB)
Use Cases
Deployment Options
SaaS Recommended
Fully managed infrastructure. Call our REST API, we handle scaling, updates, and operations.
- Zero infrastructure setup
- Automatic updates
- 99.9% uptime SLA
- Enterprise SLA available
SDK Integration
Embed directly in your application. Runs in your codebase with full programmatic control.
npm install @private.me/envsplit- TypeScript/JavaScript SDK
- Full source access
- Enterprise support available
On-Premise Upon Request
Enterprise CLI for compliance, air-gap, or data residency requirements.
- Complete data sovereignty
- Air-gap capable deployment
- Custom SLA + dedicated support
- Professional services included
Enterprise On-Premise Deployment
While xEnv is primarily delivered as SaaS or SDK, we build dedicated on-premise infrastructure for customers with:
- Regulatory mandates — HIPAA, SOX, FedRAMP, CMMC requiring self-hosted processing
- Air-gapped environments — SCIF, classified networks, offline operations
- Data residency requirements — EU GDPR, China data laws, government mandates
- Custom integration needs — Embed in proprietary platforms, specialized workflows
Includes: Enterprise CLI, Docker/Kubernetes orchestration, RBAC, audit logging, and dedicated support.