Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
27f9a3c
feat: start
HatemMn May 27, 2025
887f7ad
feat: finish
HatemMn May 28, 2025
6e1015c
feat: lint
HatemMn May 28, 2025
60cacc4
fix: downgrade ci toolchain to 1.85
HatemMn May 28, 2025
3f7fb29
Update src/adt.rs
HatemMn May 28, 2025
7f36f50
fix: bump criterion
HatemMn May 30, 2025
d6295d5
feat: generic runtime
HatemMn Jun 2, 2025
4b715ef
feat: restaure tokio in the test
HatemMn Jun 2, 2025
7860579
chore: move files, no cargo toml
HatemMn Jun 3, 2025
bd1fc60
feat: add the old files
HatemMn Jun 3, 2025
409ce51
feat: more cargo
HatemMn Jun 3, 2025
a8988d5
feat: memories are back :)
HatemMn Jun 3, 2025
7c14a50
feat: put tests and benches (untested)
HatemMn Jun 4, 2025
c590994
feat: almosy finish benches
HatemMn Jun 4, 2025
f5ed4f5
feat: well documented README.md files
HatemMn Jun 4, 2025
769a244
feat: well documented README.md files2
HatemMn Jun 4, 2025
5ebeaeb
feat: well documented README.md files3
HatemMn Jun 4, 2025
e504d37
chore: cargo fmt
HatemMn Jun 4, 2025
0b3ef59
feat: fix ci ?
HatemMn Jun 5, 2025
504a7d5
feat: fix ci 2
HatemMn Jun 5, 2025
630cccc
feat: fix ci 3
HatemMn Jun 5, 2025
67e2a28
feat: fix ci 4
HatemMn Jun 5, 2025
c3bec15
feat: fix ci 5
HatemMn Jun 5, 2025
5463707
feat: fix ci 6
HatemMn Jun 5, 2025
3dcfd09
feat: fix ci 7
HatemMn Jun 5, 2025
c43a1e0
feat: fix ci 8 (final???)
HatemMn Jun 5, 2025
a6b1589
feat: reexoports
HatemMn Jun 6, 2025
bd565ad
fix: first rev fixes
HatemMn Jun 12, 2025
d62f233
Update crate/memories/Cargo.toml
HatemMn Jun 13, 2025
ac5af20
feat: version unify
HatemMn Jun 24, 2025
893a7a7
upgrade toolchain
tbrezot Jun 12, 2025
e76093a
refacto of the PostgreSQL memory implementation
tbrezot Jun 13, 2025
61573a3
enforce uniform naming across memories
tbrezot Jun 13, 2025
63eb212
remove redundant dependency specification
tbrezot Jun 13, 2025
fb02fe9
remove unnecessary type hint
tbrezot Jun 13, 2025
58e4fc1
fix: ci
HatemMn Jun 26, 2025
c1552ce
Update crate/memories/src/sqlite_mem.rs
tbrezot Jun 26, 2025
c851ec9
upgrade toolchain
tbrezot Jun 12, 2025
fc98a2b
refacto of the PostgreSQL memory implementation
tbrezot Jun 13, 2025
ba2a3c2
enforce uniform naming across memories
tbrezot Jun 13, 2025
da1891d
remove redundant dependency specification
tbrezot Jun 13, 2025
e1e6bc7
remove unnecessary type hint
tbrezot Jun 13, 2025
3e27338
fix: ci
HatemMn Jun 26, 2025
61a805d
Update crate/memories/src/sqlite_mem.rs
tbrezot Jun 26, 2025
fd47c7c
fix rebase
tbrezot Jun 26, 2025
70ab12f
Merge branch 'feat/upgrade-toolchain' into feat/findex_workspace
HatemMn Jun 27, 2025
ceafd45
fix: review fixes
HatemMn Jun 27, 2025
6ae61c1
fix: benches
HatemMn Jun 30, 2025
89a04d4
fix: benches V2
HatemMn Jun 30, 2025
dc9d36f
fix: benches final fix
HatemMn Jun 30, 2025
0960144
feat: start of model
HatemMn Jul 1, 2025
f5eb794
feat: batch_search looks fine, at least for now
HatemMn Jul 1, 2025
da9cc12
feat: 1 2 3 soleil
HatemMn Jul 2, 2025
359b249
feat: idk looks like this works
HatemMn Jul 2, 2025
3fba3aa
feat: work in progress
HatemMn Jul 2, 2025
97e658d
feat: work in progress2
HatemMn Jul 7, 2025
b722d43
chore: working first essay, needs clean
HatemMn Jul 8, 2025
20b0c98
feat: working on error types
HatemMn Jul 8, 2025
7f772ce
feat: working on error types, keeping on
HatemMn Jul 8, 2025
12f1ca1
test: write good unit tests
HatemMn Jul 8, 2025
6873969
feat: even more err management
HatemMn Jul 9, 2025
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
12 changes: 9 additions & 3 deletions .github/workflows/benches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,16 @@ run-name: Benchmark on ${{ github.ref_name }} - ${{ github.sha }}

on: workflow_dispatch

env:
REDIS_HOST: "redis"
POSTGRES_HOST: "postgres"

jobs:
bench:
uses: Cosmian/reusable_workflows/.github/workflows/cargo-bench.yml@develop
uses: Cosmian/reusable_workflows/.github/workflows/cargo-bench.yml@fix/add_hosts_arguments
with:
toolchain: stable
features: test-utils,redis-mem,sqlite-mem,rust-mem,postgres-mem
toolchain: 1.87.0
features: test-utils,redis-mem,sqlite-mem,postgres-mem
force: true
redis-host: "redis"
postgres-host: "postgres"
24 changes: 22 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,34 @@ jobs:
cargo-lint:
uses: Cosmian/reusable_workflows/.github/workflows/cargo-nursery.yml@develop
with:
toolchain: stable
toolchain: 1.87.0
workspace: true
cargo-machete:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.87.0
- name: Install cargo-machete
run: cargo install cargo-machete
- name: Check unused dependencies in findex crate
run: |
cd crate/findex
cargo machete --with-metadata
- name: Check unused dependencies in memories crate
run: |
cd crate/memories
cargo machete --with-metadata
cargo-publish:
needs:
- cargo-lint
uses: Cosmian/reusable_workflows/.github/workflows/cargo-publish.yml@develop
if: startsWith(github.ref, 'refs/tags/')
with:
toolchain: stable
toolchain: 1.87.0
secrets: inherit
cleanup:
needs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/hack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
toolchain: 1.87.0
override: true
- name: Install cargo-hack
run: cargo install --locked cargo-hack || true
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ target/
perf*
flamegraph.svg
**/*.tgz
*.sqlite.db*
60 changes: 10 additions & 50 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
[package]
name = "cosmian_findex"
version = "7.1.0"
[workspace]
members = ["crate/findex", "crate/memories"]
resolver = "2"

[workspace.package]
version = "8.0.0"
authors = [
"Bruno Grieder <bruno.grieder@cosmian.com>",
"Célia Corsin <celia.corsin@cosmian.com>",
Expand All @@ -15,56 +18,13 @@ keywords = ["SSE"]
license = "BUSL-1.1"
repository = "https://github.com/Cosmian/findex/"
description = "Symmetric Searchable Encryption"
readme = "README.md"

[lib]
name = "cosmian_findex"
path = "src/lib.rs"

[features]
rust-mem = []
redis-mem = ["redis"]
sqlite-mem = ["async-sqlite"]
test-utils = ["tokio", "criterion", "futures", "rand", "rand_distr"]
postgres-mem = ["tokio-postgres", "tokio", "deadpool-postgres"]

[dependencies]
aes = "0.8"
[workspace.dependencies]
cosmian_crypto_core = { version = "10.1", default-features = false, features = [
"macro",
"sha3",
] }
xts-mode = "0.5"

# Used in benches and tests.
criterion = { version = "0.5", optional = true }
futures = { version = "0.3", optional = true }
rand = { version = "0.9.0", optional = true }
rand_distr = { version = "0.5.1", optional = true }
tokio = { version = "1.44", features = ["rt-multi-thread"], optional = true }


# Memory dependencies
async-sqlite = { version = "0.5", optional = true }
deadpool-postgres = { version = "0.14.1", optional = true }
redis = { version = "0.28", features = [
"aio",
"connection-manager",
"tokio-comp",
], optional = true }
tokio-postgres = { version = "0.7.9", optional = true, features = [
"array-impls",
] }


[dev-dependencies]
futures = { version = "0.3" }
tokio = { version = "1.44", features = ["macros", "rt-multi-thread"] }

[[bench]]
name = "benches"
harness = false
required-features = ["test-utils"]

[[example]]
name = "insert"
required-features = ["test-utils"]
criterion = { version = "0.6" }
tokio = { version = "1.45" }
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
# Findex
# Findex: Symmetric Searchable Encryption

To build Findex simply run:
[![Crates.io](https://img.shields.io/crates/v/cosmian_findex.svg)](https://crates.io/crates/cosmian_findex)
[![Documentation](https://docs.rs/cosmian_findex/badge.svg)](https://docs.rs/cosmian_findex)
[![License](https://img.shields.io/badge/License-BUSL--1.1-blue.svg)](LICENSE)

```bash
cargo build --release
```
Findex is a Symmetric Searchable Encryption (SSE) library that enables encrypted search over encrypted data. It allows you to securely index and search encrypted data without compromising privacy or security.

To test, run:
## Architecture

```bash
cargo test --release --all-features
```
This repository is organized as a Rust workspace with two crates:

To launch the benchmarks, run:
- `cosmian_findex`: Core library implementing the SSE algorithms
- `cosmian_findex_memories`: Storage back-end implementations for different databases

```bash
cargo bench --all-features
```
## Related Projects

Note that benches are quite involving and require *several hours* for a full
run. Once all benchmarks are run, you will find detailed reports under `target/criterion`.
[Findex Server](github.com/cosmian/findex-server) - A production-ready Findex server implementation

## License

This project is licensed under the Business Source License 1.1 (BUSL-1.1).
8 changes: 0 additions & 8 deletions benches/data/concurrent.dat

This file was deleted.

16 changes: 0 additions & 16 deletions benches/data/insert.dat

This file was deleted.

16 changes: 0 additions & 16 deletions benches/data/search.dat

This file was deleted.

76 changes: 0 additions & 76 deletions benches/make_figures.tex

This file was deleted.

38 changes: 38 additions & 0 deletions crate/findex/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
[package]
name = "cosmian_findex"
version.workspace = true
authors.workspace = true
categories.workspace = true
edition.workspace = true
keywords.workspace = true
license.workspace = true
repository.workspace = true
description.workspace = true
readme = "README.md"

[lib]
name = "cosmian_findex"
path = "src/lib.rs"

[features]
test-utils = ["tokio", "criterion"]

[dependencies]
cosmian_crypto_core.workspace = true
aes = "0.8"
xts-mode = "0.5"

# Optional dependencies for testing and benchmarking.
tokio = { workspace = true, features = [
"rt-multi-thread",
"macros",
], optional = true }
criterion = { workspace = true, optional = true }
futures = "0.3.31"

[dev-dependencies]
tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }

[[example]]
name = "insert"
required-features = ["test-utils"]
14 changes: 14 additions & 0 deletions crate/findex/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Findex

This crate provides the core functionality of Findex, defining the abstract data types, cryptographic operations, and encoding algorithms.

## Setup

Add `cosmian_findex` as dependency to your project :

```toml
[dependencies]
cosmian_findex = "8.0.0"
```

An usage example is available in the [examples folder](./examples).
Loading
Loading