Skip to content

Commit

Permalink
small doc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
bgrieder committed Aug 2, 2023
1 parent bdff0bb commit 94afb9d
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 19 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.

## [5.0.0] - 2023-07-21

### Features

- Changed the Search, Upsert and Compact API from mutable to immutable
- Upsert now returns the set of new keywords added to the Entry Table

### Bug Fixes

- add missing `async` keyword for compact callbacks
Expand Down
30 changes: 14 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

![Build status](https://github.com/Cosmian/findex/actions/workflows/ci.yml/badge.svg)
![Build status](https://github.com/Cosmian/findex/actions/workflows/build.yml/badge.svg)
![latest version](<https://img.shields.io/crates/v/cosmian_findex.svg>)
![latest version](https://img.shields.io/crates/v/cosmian_findex.svg)

Findex aims to solve the following problem:

> How to securely recover the *location* of an encrypted data matching a given
> *keyword*?
> How to securely recover the _location_ of an encrypted data matching a given
> _keyword_?
It is a cryptographic protocol designed to securely make search queries on an
untrusted cloud server. Thanks to its encrypted indexes, large databases can
Expand All @@ -20,35 +20,33 @@ Findex is part of Cosmian Cloudproof Encryption.
- [Getting started](#getting-started)
- [Building and testing](#building-and-testing)
- [Findex indexes](#findex-indexes)
* [Two indexing strategies](#two-indexing-strategies)
- [Two indexing strategies](#two-indexing-strategies)
- [Benchmarks](#benchmarks)
- [Documentation](#documentation)

<!-- tocstop -->

## Getting started

Findex allows to index values by keywords. These values can be locations (UIDs
Findex allows indexing values by keywords. These values can be locations (UIDs
of an encrypted database, URLs, paths, etc.).

Using Findex API one can:

- index or desindex values by keywords via the `FindexUpsert` trait;
- index or deindex values by keywords via the `FindexUpsert` trait;
- search for keywords via the `FindexSearch` trait;
- compact the indexes via the `FindexCompact` trait.

These traits can be automatically implemented and a macro is provided to help
with the syntax. The default parameters (the ones used by the macro) are
defined in [`parameters.rs`](./src/parameters.rs).

Findex delegates to the user the implementation of *callbacks* to manipulate
the indexes. This makes Findex compatible with any database technology since no
database specific code is part of it. Implementation is done via the
Findex delegates to the user the implementation of _callbacks_ to manipulate
the indexes. This makes Findex compatible with any database technology since no database-specific code is part of it. Implementation is done via the
`FindexCallbacks` trait. See [`callbacks.md`](./callbacks.md) for details on
the implementation of the callbacks.

See [`in_memory_example.rs`](./src/in_memory_example.rs) for a example of
implementation.
See `in_memory_example.rs` for an example of implementation.

## Building and testing

Expand All @@ -72,7 +70,7 @@ cargo bench --all-features

## Findex indexes

Findex relies on two server side indexes:
Findex relies on two server-side indexes:

- **Entry Table**: provides the values needed to fetch the correct locations
from the Chain Table. Each indexing keyword matches a line in the Entry
Expand All @@ -84,8 +82,8 @@ Findex relies on two server side indexes:
stored by blocks of fixed length and the same number of blocks is stored in
each line (padding is added where necessary).

Findex indexes are key value stores which structure is given in the following
tables, with $K_{w_i}$ the ephemeral key associated to a keyword $w_i$,
Findex indexes are key-value stores whose structure is given in the following
tables, with $K_{w_i}$ the ephemeral key associated with a keyword $w_i$,
$H_{w_i}$ the hash of $w_i$ and $UID_{last}$ the last UID of the chain of
indexed values associated to $w_i$.

Expand Down Expand Up @@ -214,7 +212,7 @@ More client/server interactions are needed for the graph solution: the depth of
the graph (4 in this example) compared to 1 for the naive solution and 2 for
the mixed solution.

In the other hand, the graph solution optimizes the size of the Chain Table.
On the other hand, the graph solution optimizes the size of the Chain Table.

<table>
<tr>
Expand Down Expand Up @@ -292,7 +290,7 @@ In the other hand, the graph solution optimizes the size of the Chain Table.

## Benchmarks

The benchmarks presented in this section are run on a Intel(R) Xeon(R) Platinum 8171M CPU @ 2.60GHz.
The benchmarks presented in this section are run on an Intel(R) Xeon(R) Platinum 8171M CPU @ 2.60GHz.

- [Findex in memory (no database)](./benches/BENCHMARKS.md)

Expand Down
9 changes: 6 additions & 3 deletions src/upsert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pub trait FindexUpsert<
{
/// Index the given values for the associated keywords.
///
/// Returns the set of the new keywords.
/// Returns the set of the new keywords added.
///
/// # Parameters
///
Expand All @@ -44,8 +44,11 @@ pub trait FindexUpsert<
}

/// Removes the given values from the indexes for the associated keywords.
///
/// This call actually adds a "delete" to the chain table
/// (and potentially the Entry Table if it did not exits before)
///
/// Returns the set of the new keywords.
/// Returns the set of the new keywords added.
///
/// # Parameters
///
Expand All @@ -63,7 +66,7 @@ pub trait FindexUpsert<

/// Upsert the given chain elements in Findex tables.
///
/// Returns the set of the new keywords.
/// Returns the set of the new keywords added.
///
/// # Parameters
///
Expand Down

0 comments on commit 94afb9d

Please sign in to comment.