Skip to content

Commit

Permalink
docs: use LaTeX instead of markdown for math text
Browse files Browse the repository at this point in the history
  • Loading branch information
csirianni committed Dec 25, 2023
1 parent 5c2dd6d commit 0c5d2fb
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## About

The backend hosts the breached passwords for use in the Private Set Intersection computation. The user sends a password and receives that password and the set of breached passwords both encrypted with secret key `b`. The backend uses [Crow](https://crowcpp.org/master/) for the REST API, [SQLite3](https://www.sqlite.org/index.html) for the breached password database, and [Libsodium](https://libsodium.gitbook.io/doc/) for the cryptography. The API has a single endpoint:
The backend hosts the breached passwords for use in the Private Set Intersection computation. The user sends a password and receives that password and the set of breached passwords both encrypted with secret key $b$. The backend uses [Crow](https://crowcpp.org/master/) for the REST API, [SQLite3](https://www.sqlite.org/index.html) for the breached password database, and [Libsodium](https://libsodium.gitbook.io/doc/) for the cryptography. The API has a single endpoint:

### Encrypt user password and get breached passwords

Expand All @@ -14,7 +14,7 @@ This endpoint encrypts the user's password and provides a list of encrypted brea

`body` *Required*

The leaked bytes followed by the user's encrypted password. In general, for `n` leaked bytes, the length of the data is `32 + n`:
The leaked bytes followed by the user's encrypted password. In general, for $n$ leaked bytes, the length of the data is $32 + n$:

```text
0 n 32 + n
Expand Down Expand Up @@ -59,34 +59,39 @@ const response = await fetch(

In `/backend`, start by installing [Conan](https://conan.io/):

```bash
```console
brew install conan
```

Them, install the project's packages using the following:

```console
conan install . --output-folder=build --build=missing
```

You probably need to create a default profile. Use `conan profile detect`.

If you haven't installed CMake already, do so now:

```bash
```console
brew install cmake
```

Next, link and compile the program:

```bash
```console
make build
```

From `/backend`, start the server. Use the `--build` flag to create or rebuild a database for the breached passwords:

```bash
```console
build/src/server <database filepath> --build
```

Or, omit the `--build` flag to use an existing database:

```bash
```console
build/src/server data/passwords.db
```

Expand All @@ -104,12 +109,12 @@ To fix VS Code import errors, try adding the following line to your `settings.js

After building, you can run tests from `/backend`:

```bash
```console
cd build && ./test/pdl_test
```

or alternatively:

```bash
```console
make check
```

0 comments on commit 0c5d2fb

Please sign in to comment.