Skip to content

Feature/secure-storage-integration (web + native)#545

Draft
0xB19 wants to merge 1 commit intofeature/secure-storagefrom
feature/secure-storage-native
Draft

Feature/secure-storage-integration (web + native)#545
0xB19 wants to merge 1 commit intofeature/secure-storagefrom
feature/secure-storage-native

Conversation

@0xB19
Copy link
Copy Markdown
Collaborator

@0xB19 0xB19 commented Mar 27, 2026

No description provided.

@0xB19 0xB19 changed the title feat: native Capacitor plugin with parallel PQ crypto feature/secure-storage-native Mar 27, 2026
@0xB19 0xB19 changed the title feature/secure-storage-native Feature/secure-storage-native Mar 27, 2026
@0xB19 0xB19 force-pushed the feature/secure-storage-native branch 2 times, most recently from 9fdfe76 to 56ed2ab Compare March 27, 2026 07:52
@0xB19 0xB19 changed the title Feature/secure-storage-native Feature/2-secure-storage-native Mar 30, 2026
@0xB19 0xB19 force-pushed the feature/secure-storage-native branch 2 times, most recently from 448b759 to e8cbea9 Compare March 31, 2026 14:27
@0xB19 0xB19 changed the title Feature/2-secure-storage-native Feature/secure-storage-integration (web + native) Apr 2, 2026
@0xB19 0xB19 changed the base branch from feature/secure-storage-web to feature/secure-storage April 2, 2026 09:38
@0xB19 0xB19 force-pushed the feature/secure-storage-native branch 3 times, most recently from 6cb7d87 to ff2b0de Compare April 2, 2026 11:47
… optimizations

Native Capacitor plugin (iOS/Android):
- SecureStoragePlugin (Swift/Kotlin) with UniFFI bindings to Rust
- 8MB stack threads for PQ crypto, parallel execution (3 threads)
- Build scripts, XCFramework, jniLibs
- Biometric Secure Enclave fixes

Web storage: replace OPFS+WAL with IndexedDB:
- New IdbBlockStorage: in-memory HashMap for sync VFS + async IDB persistence
- Delete opfs_wal_storage.rs + wal.rs (-800 lines)
- Fire-and-forget flush timer (non-blocking worker)
- Same key-value model as redb on native

Shared VFS write buffering (pending.rs):
- Buffer writes in x_write, coalesce at x_sync
- Group by contiguous blocks (avoid re-encrypting untouched intermediate blocks)
- synchronous=NORMAL so SQLite calls x_sync at COMMIT

SDK optimizations:
- withTransaction batching (addMessage, discussion init, send queue)
- Deferred session persist (beginDeferPersist/flushPersist)
- sendMessage always persists immediately (ratchet safety)

Build:
- npm run wasm:build:secure (cargo + wasm-bindgen)
- .cargo/config.toml with 4MB WASM stack
@0xB19 0xB19 force-pushed the feature/secure-storage-native branch from ff2b0de to 04e7b57 Compare April 2, 2026 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant