@zkim-platform/file-format 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +72 -0
- package/LICENSE +22 -0
- package/README.md +695 -0
- package/dist/index.cjs +12170 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +1918 -0
- package/dist/index.d.ts +1918 -0
- package/dist/index.js +12126 -0
- package/dist/index.js.map +1 -0
- package/package.json +78 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [1.0.0] - 2025-12-30
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- Initial release of @zkim/file-format
|
|
12
|
+
- **Core Features:**
|
|
13
|
+
- Three-layer encryption with XChaCha20-Poly1305 (platform, user, content layers)
|
|
14
|
+
- Privacy-preserving searchable encryption using OPRF-based trapdoors
|
|
15
|
+
- Integrity validation with BLAKE3 hashing and Ed25519 signatures
|
|
16
|
+
- Error detection and recovery mechanisms for corrupted files
|
|
17
|
+
- Optional GZIP/Brotli compression for efficient storage
|
|
18
|
+
- Performance monitoring and optimization
|
|
19
|
+
- Constant-time security operations to prevent timing attacks
|
|
20
|
+
- **Storage Backends:**
|
|
21
|
+
- InMemoryStorage for testing and temporary storage
|
|
22
|
+
- LocalStorageBackend for browser environments
|
|
23
|
+
- Custom storage backend interface (IStorageBackend)
|
|
24
|
+
- **Services:**
|
|
25
|
+
- ZKIMFileService - Main file service for creating and managing encrypted files
|
|
26
|
+
- ZkimEncryption - Three-layer encryption service
|
|
27
|
+
- ZkimIntegrity - Integrity validation and tampering detection
|
|
28
|
+
- SearchableEncryption - Privacy-preserving search with trapdoor rotation
|
|
29
|
+
- ZkimErrorRecovery - Advanced error recovery strategies
|
|
30
|
+
- ZkimPerformanceMonitor - Performance tracking and optimization
|
|
31
|
+
- QueryBatcher - Query batching and load balancing
|
|
32
|
+
- TrapdoorRotator - Trapdoor rotation and revocation management
|
|
33
|
+
- **Documentation:**
|
|
34
|
+
- Comprehensive README with API reference
|
|
35
|
+
- CONTRIBUTING.md with contribution guidelines
|
|
36
|
+
- 7 working examples (basic, encryption, searchable, integrity, error handling, Node.js, browser)
|
|
37
|
+
- Full TypeScript type definitions
|
|
38
|
+
- **Testing:**
|
|
39
|
+
- 1,307 tests passing (2 skipped, 0 failing)
|
|
40
|
+
- 92.09% statement coverage, 82.15% branch coverage, 95.83% function coverage, 92.16% line coverage
|
|
41
|
+
- Test fixtures and utilities
|
|
42
|
+
- Comprehensive unit test coverage
|
|
43
|
+
- **CI/CD:**
|
|
44
|
+
- GitHub Actions workflows for automated testing
|
|
45
|
+
- Automated npm publishing on release tags
|
|
46
|
+
- Security scanning and code quality checks
|
|
47
|
+
- Coverage reporting to Codecov
|
|
48
|
+
|
|
49
|
+
### Security
|
|
50
|
+
- Zero-knowledge encryption architecture
|
|
51
|
+
- Web Crypto API prohibition (uses libsodium-wrappers-sumo exclusively)
|
|
52
|
+
- Secure key derivation and management
|
|
53
|
+
- Trapdoor rotation for searchable encryption
|
|
54
|
+
- Corruption detection and recovery
|
|
55
|
+
- Constant-time comparisons for cryptographic operations
|
|
56
|
+
- BLAKE3 hashing (standard ZKIM hash algorithm)
|
|
57
|
+
- Ed25519 signatures for integrity validation
|
|
58
|
+
|
|
59
|
+
### Technical Details
|
|
60
|
+
- **Dependencies:**
|
|
61
|
+
- libsodium-wrappers-sumo ^0.7.15 - Cryptographic operations
|
|
62
|
+
- @noble/hashes ^2.0.1 - BLAKE3 hashing
|
|
63
|
+
- @noble/curves ^2.0.1 - Ristretto255 for searchable encryption
|
|
64
|
+
- **Platform Support:**
|
|
65
|
+
- Node.js 18+ with ES Modules
|
|
66
|
+
- Modern browsers with TypedArray support
|
|
67
|
+
- Cross-platform compatibility
|
|
68
|
+
- **Build:**
|
|
69
|
+
- TypeScript 5.9+ with strict mode
|
|
70
|
+
- ESM and CommonJS dual package support
|
|
71
|
+
- Source maps and declaration files included
|
|
72
|
+
|
package/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 ZKIM Team
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|