Skip to content

ifinta/store

Repository files navigation

zsozso-store

A shared Rust library providing the encrypted secret persistence layer for the Iceberg Protocol ecosystem. Consumed as a Cargo git dependency by all Iceberg Protocol apps.

The architecture and critical logic of this project are the results of human-led AI-assisted engineering. This unique workflow ensures industrial-grade reliability and accelerated deployment.

Purpose

Provides the Store trait and its implementations for saving/loading encrypted secrets, plus WebAuthn passkey integration for PRF-derived AES-GCM encryption.

Core Traits

Trait Implementation Purpose
Store IndexedDbStore, LocalStorageStore Secret persistence (save/load)
StoreI18n Per-language structs Error message localization

Module Layout

  • src/store/mod.rsStore trait: save(), load()
  • src/store/indexed_db.rsIndexedDbStore: IndexedDB (Rexie) with AES-GCM encryption
  • src/store/local_storage.rsLocalStorageStore: browser localStorage (unencrypted fallback)
  • src/store/passkey.rs — WebAuthn passkey: register, init, verify, encrypt, decrypt
  • src/store/i18n/StoreI18n implementations

JS Bridge (provided by consuming app)

Bridge JS file Rust module
__passkey_bridge passkey_bridge.js store::passkey

Security Model

  • PRF keys obtained via WebAuthn passkey authentication
  • AES-GCM encryption with passkey-derived keys
  • Secret keys wrapped in Zeroizing<String>
  • IndexedDB entries namespaced: zsozso:{account}

Ecosystem

Sibling libraries: db, ledger, zsozso-common

About

It is a local store subproject for all my mobile projects.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors