This project contains a client and a server, both written in Rust, along with shared libraries and tooling.
A detailed report that explains every choice regarding the cryptographic algorithms, nounces, keys size as well as other important information can be found at report.pdf.
src/
├── Cargo.lock
├── Cargo.toml
├── client/
├── server/
├── lib/
├── unpacker/
├── packer/
├── data/
└── target/
- Rust toolchain (stable)
cargo- Linux environment (Unix permissions assumed)
- Go to the server directory:
cd src/server- Build and run the server:
cargo run --releaseThe server will start and listen on the configured address (by default http://127.0.0.1:8085).
- Go to the client directory:
cd src/client- Run the client using
cargo run --release --followed by the required arguments.
| Argument | Description |
|---|---|
--base-url |
Server base URL |
--work-dir |
Working directory used to store/read files |
--id |
Client identifier (UUID v4) |
| Argument | Description |
|---|---|
--dictionnary |
Path to the dictionary file (required together with --random-password) |
--random-password |
Generate a random password from the dictionary instead of prompting |
--select-file |
Parsed but not currently wired to any behaviour (reserved) |
⚠️ The--idmust be a UUID v4. The UUID shown in examples below is only a placeholder.
The client is fully interactive — after launching, it will guide you through the following prompts:
-
Mode — choose one of:
encryptdecryptchange-password
-
Target (encrypt / decrypt only) — choose one of:
file— pick a single filedirectory— pick a directory (all files inside are processed recursively)
-
Path selector — browse and select the target file or directory from your
--work-dir. -
Password prompt (encrypt / change-password only) — either type a password (minimum 10 characters, confirmed twice) or, if
--random-passwordand--dictionnaryare set, a random passphrase is generated automatically.
change-passwordonly rotates the Key Encryption Key (KEK). It does not re-encrypt the Master Encryption Key (MEK) with the new KEK. If you need a full re-key, re-encrypt your files from scratch.- Keys call
.zeroize()on drop to clear sensitive material from memory. - The server's KEM and signing public keys are baked into the client binary at compile time.
cargo run --release -- \
--base-url http://127.0.0.1:8085 \
--work-dir ./data/files/ \
--id 2c6fd123-ef03-4246-b020-e61a364168b7Then select encrypt in the interactive menu and enter your password when prompted.
cargo run --release -- \
--base-url http://127.0.0.1:8085 \
--work-dir ./data/files/ \
--id 2c6fd123-ef03-4246-b020-e61a364168b7 \
--random-password \
--dictionnary ./data/dictionnary.txtThen select encrypt in the interactive menu.
cargo run --release -- \
--base-url http://127.0.0.1:8085 \
--work-dir ./data/files/ \
--id 2c6fd123-ef03-4246-b020-e61a364168b7Then select decrypt in the interactive menu.
cargo run --release -- \
--base-url http://127.0.0.1:8085 \
--work-dir ./data/files/ \
--id 2c6fd123-ef03-4246-b020-e61a364168b7Then select change-password in the interactive menu and enter the new password when prompted.
⚠️ See Security Notes for whatchange-passworddoes and does not do.
- Always run the server first, then the client.
- Use a new UUID v4 per client instance.
- Paths can be relative or absolute.
- Running
cargo runwithout the required arguments will fail. - Passwords must be at least 10 characters long.
--dictionnaryis only valid when used together with--random-password.
uuidgenExample output:
2c6fd123-ef03-4246-b020-e61a364168b7