Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
d2f63f8
gitignore: allow rust cargo config
prateekmedia Jan 16, 2026
a817949
rust: force chacha20 neon on aarch64
prateekmedia Jan 16, 2026
895ae3b
rust/core: add crypto + auth dependencies
prateekmedia Jan 16, 2026
3073a56
rust/core: add crypto error type
prateekmedia Jan 16, 2026
b1e32ad
rust/core: add crypto public API helpers
prateekmedia Jan 16, 2026
034e90a
rust/core: add crypto backend init
prateekmedia Jan 16, 2026
2f7fc89
rust/core: add key derivation helpers
prateekmedia Jan 16, 2026
dc6e686
rust/core: add hash utilities
prateekmedia Jan 16, 2026
721353b
rust/core: add secretbox encryption
prateekmedia Jan 16, 2026
c3676e3
rust/core: add blob encryption
prateekmedia Jan 16, 2026
eb93d1a
rust/core: add stream encryption
prateekmedia Jan 16, 2026
84533a2
rust/core: add sealed box encryption
prateekmedia Jan 16, 2026
07cdf9a
rust/core: add auth types
prateekmedia Jan 16, 2026
b155bfd
rust/core: add auth key generation
prateekmedia Jan 16, 2026
5c7546e
rust/core: add auth login helpers
prateekmedia Jan 16, 2026
6d3cac3
rust/core: add auth crypto API
prateekmedia Jan 16, 2026
610a666
rust/core: add auth recovery helpers
prateekmedia Jan 16, 2026
5ff6095
rust/core: add SRP session implementation
prateekmedia Jan 16, 2026
e72f879
rust/core: add auth module exports
prateekmedia Jan 16, 2026
9705735
rust/core: expose auth + crypto modules
prateekmedia Jan 16, 2026
a2388ff
rust/core/tests: add libsodium vectors
prateekmedia Jan 16, 2026
6179fa2
rust/core/tests: add auth integration tests
prateekmedia Jan 16, 2026
583a52b
rust/core/tests: add crypto interop tests
prateekmedia Jan 16, 2026
bd5245c
rust/core/tests: add comprehensive crypto tests
prateekmedia Jan 16, 2026
a926a10
rust/core/tests: add js interop test
prateekmedia Jan 16, 2026
e5825d0
rust/core/tests: add js test harness
prateekmedia Jan 16, 2026
0648bcb
rust/core/docs: add auth documentation
prateekmedia Jan 16, 2026
ca3ec0c
rust/core/docs: add crypto documentation
prateekmedia Jan 16, 2026
ef290b1
rust/core: expand README for auth + crypto
prateekmedia Jan 16, 2026
920ebd2
rust: update repository layout docs
prateekmedia Jan 16, 2026
b7284a6
rust/core: add fuzz targets
prateekmedia Jan 16, 2026
7184619
ci: add rust/core fuzz workflow
prateekmedia Jan 16, 2026
a56d28c
rust/validation: add crate scaffold
prateekmedia Jan 16, 2026
4ccd254
rust/validation: add crypto validation tests
prateekmedia Jan 16, 2026
d4a49b6
rust/validation: add README
prateekmedia Jan 16, 2026
7a08ce6
rust/validation: add benchmark tooling
prateekmedia Jan 16, 2026
dab1088
rust/validation: add wasm benchmark crate
prateekmedia Jan 16, 2026
c447ecb
rust/validation: add browser wasm benchmark page
prateekmedia Jan 16, 2026
1d908aa
rust/cli: switch dependencies to ente-core
prateekmedia Jan 16, 2026
76dc39a
rust/cli: remove internal crypto module
prateekmedia Jan 16, 2026
f52de45
rust/cli: update auth API client
prateekmedia Jan 16, 2026
0d28974
rust/cli: refresh error model
prateekmedia Jan 16, 2026
97b5239
rust/cli: update account commands for core auth
prateekmedia Jan 16, 2026
671a21c
rust/cli: adjust export command crypto usage
prateekmedia Jan 16, 2026
bc10e61
rust/cli: update sync command helpers
prateekmedia Jan 16, 2026
d64d2ba
rust/cli: update download helpers for core crypto
prateekmedia Jan 16, 2026
5270b50
rust/cli: adjust entrypoints
prateekmedia Jan 16, 2026
7c298cf
rust/cli: update README
prateekmedia Jan 16, 2026
e089e89
fix lint
prateekmedia Jan 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/rust-fuzz-core.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: "Fuzz (rust/core)"

on:
workflow_dispatch:
schedule:
# Weekly (Sunday 00:00 UTC)
- cron: "0 0 * * 0"

permissions:
contents: read

jobs:
fuzz:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install nightly toolchain
uses: dtolnay/rust-toolchain@nightly

- name: Cache
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
rust/core/target
rust/core/fuzz/target
key: ${{ runner.os }}-cargo-fuzz-${{ hashFiles('rust/core/Cargo.lock') }}

- name: Install cargo-fuzz
run: cargo +nightly install cargo-fuzz

- name: Run fuzz target (secretbox)
working-directory: rust/core
run: cargo +nightly fuzz run secretbox -- -max_total_time=300
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,12 @@

# Ignore CLAUDE.local.md files anywhere in the repository
CLAUDE.local.md

# Local cargo config / per-dev exports
.cargo/
!rust/.cargo/
!rust/.cargo/config.toml
rust/cli/exports/

# Node
node_modules/
2 changes: 2 additions & 0 deletions rust/.cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[target.'cfg(target_arch = "aarch64")']
rustflags = ["--cfg", "chacha20_force_neon"]
57 changes: 53 additions & 4 deletions rust/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,26 @@ rust/
│ ├── Cargo.toml
│ └── Cargo.lock
└── core/ # Pure Rust business logic
├── core/ # Pure Rust business logic
│ ├── src/
│ │ ├── lib.rs
│ │ └── urls.rs
│ └── Cargo.toml # crate name: ente-core
└── validation/ # Crypto validation + benchmarks vs libsodium
├── src/
│ ├── lib.rs
│ └── urls.rs
└── Cargo.toml # crate name: ente-core
│ ├── main.rs
│ └── bin/
│ └── bench.rs
├── wasm/ # WASM bench bindings
│ ├── src/
│ │ └── lib.rs
│ └── Cargo.toml # crate name: ente-validation-wasm
├── js/ # JS + WASM benchmarks
│ ├── bench-wasm.mjs
│ ├── bench-wasm-browser.mjs
│ └── bench-wasm-browser.html
└── Cargo.toml # crate name: ente-validation

web/packages/wasm/ # WASM bindings (lives in web workspace)
├── src/
Expand Down Expand Up @@ -80,6 +95,7 @@ mobile/apps/photos/rust/ # Photos app-specific FRB bindings
**Crates:**

- `ente-core` - shared business logic (pure Rust, no FFI)
- `ente-validation` - validation + benchmarks vs libsodium
- `ente-wasm` - wasm-bindgen wrappers for web
- `ente_rust` - shared FRB wrappers for mobile (Dart class: `EnteRust`)
- `ente_photos_rust` - Photos app-specific FRB (Dart class: `EntePhotosRust`)
Expand Down Expand Up @@ -128,6 +144,39 @@ cargo build # build
cargo test # test
```

**ente-validation (rust/validation/):**

```sh
cargo run -p ente-validation --bin ente-validation # validation suite
cargo run -p ente-validation --bin bench # benchmarks (debug)
cargo run -p ente-validation --bin bench --release # benchmarks (release)
```

**ente-validation wasm benchmarks (rust/validation/):**

Node (rust-core wasm vs libsodium-wrappers-sumo wasm):

```sh
wasm-pack build --target nodejs rust/validation/wasm # wasm bench build
cd rust/validation/js
npm install
node bench-wasm.mjs # wasm benchmarks
```

Browser (Chrome):

```sh
wasm-pack build --target web rust/validation/wasm
cd rust/validation
python3 -m http.server 8000
```

Open:

```text
http://localhost:8000/js/bench-wasm-browser.html
```

**ente-wasm (web/packages/wasm/):**

```sh
Expand Down
Loading