You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/repos/pdf-signature.md
+54-4Lines changed: 54 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,13 +2,13 @@
2
2
3
3
[GitHub](https://github.com/encryption4all/pdf-signature) · Rust + TypeScript · PDF Signing
4
4
5
-
PDF signing and signature verification utility. Used within the PostGuard ecosystem for signing PDF documents with identity-based signatures.
5
+
PDF signing and signature verification utility. Used within the PostGuard ecosystem for signing PDF documents with identity-based signatures. This is a fork of [Cryptify](/repos/cryptify) with the same architecture.
6
6
7
7
## Architecture
8
8
9
9
The repository is structured similarly to [Cryptify](/repos/cryptify), with a Rust backend and TypeScript frontend:
10
10
11
-
-**Backend** (`cryptify-back-end/`): Rust service handling PDF operations
11
+
-**Backend** (`cryptify-back-end/`): Rust (Rocket) service handling PDF operations, file storage, and email notifications
12
12
-**Frontend** (`cryptify-front-end/`): TypeScript web interface
13
13
14
14
## Development
@@ -23,9 +23,59 @@ docker-compose -f docker-compose.dev.yml up
23
23
docker-compose up
24
24
```
25
25
26
-
### Manual Setup
26
+
### Frontend (manual)
27
27
28
-
See the Cryptify development instructions for the general pattern. The backend requires Rust and the frontend requires Node.js.
28
+
Requires Node.js and Rust.
29
+
30
+
```bash
31
+
cd cryptify-front-end
32
+
npm install
33
+
npm run start # development server
34
+
npm run build # production build
35
+
```
36
+
37
+
When developing locally, change the `baseurl` constant in `FileProvider.ts` to `http://localhost:3000` so the frontend uses the local backend.
38
+
39
+
Cryptify/pdf-signature can also be packaged as a desktop app:
40
+
41
+
```bash
42
+
cd cryptify-front-end
43
+
npm run dist-electron
44
+
```
45
+
46
+
### Backend (manual)
47
+
48
+
The backend needs a configuration file. See `conf/` for examples.
49
+
50
+
#### Configuration
51
+
52
+
The configuration file (`conf/config.toml` or `conf/config.dev.toml`) controls:
53
+
54
+
| Option | Description |
55
+
|---|---|
56
+
|`server_url`| Public URL of the service |
57
+
|`address`| Bind address (e.g. `0.0.0.0`) |
58
+
|`data_dir`| Directory for file storage |
59
+
|`email_from`| Sender address for email notifications |
60
+
|`smtp_url`| SMTP server hostname |
61
+
|`smtp_port`| SMTP server port |
62
+
|`smtp_credentials`| SMTP username and password (optional) |
63
+
|`allowed_origins`| CORS allowed origins (regex) |
For background on the IRMA/Yivi protocol, see the [IRMA documentation](https://irma.app/docs/what-is-irma/). The PostGuard encryption protocol is described in the [irmaseal design document](https://github.com/Wassasin/irmaseal/blob/master/docs/design.md).
17
+
16
18
## Development
17
19
18
20
### Docker (recommended)
@@ -30,6 +32,17 @@ docker-compose up
30
32
31
33
The application is available at `http://tguard.localhost`.
32
34
35
+
### Dependencies
36
+
37
+
The Docker setup includes all required software. For manual development, the following versions are used:
Copy file name to clipboardExpand all lines: docs/repos/postguard.md
+83-3Lines changed: 83 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,10 @@
2
2
3
3
[GitHub](https://github.com/encryption4all/postguard) · Rust · Core library and services
4
4
5
+
::: warning
6
+
This implementation has not been audited. Use at your own risk.
7
+
:::
8
+
5
9
The main PostGuard repository. It contains the core encryption library, the Private Key Generator (PKG) server, WebAssembly bindings for browsers, a command-line client, and FFI bindings for native language integration.
6
10
7
11
## Workspace Structure
@@ -10,7 +14,7 @@ The repository is a Rust workspace with five crates:
10
14
11
15
| Crate | Description |
12
16
|---|---|
13
-
|`pg-core`| Core library: metadata management, binary serialization, streaming encryption (with a WebCrypto-backed WASM backend under the `web`and`stream` features) |
17
+
|`pg-core`| Core library: metadata management, binary serialization, streaming encryption. Supports a native Rust backend (`rust` feature) and a WebCrypto-backed WASM backend (`web`+`stream` features).|
14
18
|`pg-pkg`| HTTP API server (Actix-web) that runs a Private Key Generator instance |
15
19
|`pg-wasm`| WebAssembly bindings via `wasm-pack`, used by the JavaScript SDK |
16
20
|`pg-cli`| Command-line tool for encrypting and decrypting files |
This starts a Yivi session (displays a QR code) to obtain signing keys, then encrypts `myfile.txt` into `myfile.txt.enc`.
130
+
131
+
#### Decrypt a file
132
+
133
+
```bash
134
+
cargo run --bin pg-cli dec myfile.txt.enc
135
+
```
136
+
137
+
The CLI shows the recipient policies in the header, prompts you to select your identity, and starts a Yivi session to obtain your decryption key.
138
+
67
139
## Releasing
68
140
69
141
This repository uses [Release-plz](https://release-plz.ieni.dev/) for automated versioning and releases. When changes are merged to `main`, Release-plz creates a release PR. Merging that PR triggers:
@@ -81,3 +153,11 @@ This repository uses [Release-plz](https://release-plz.ieni.dev/) for automated
81
153
|`build.yml`| Push/PR | Formatting checks, tests for all workspace members |
82
154
|`delivery.yml`| Push to main | Release-plz, Docker build, FFI compilation, npm publish |
83
155
|`docs.yml`| Push to main | Deploys API docs to GitHub Pages |
156
+
157
+
## Docusaurus Site
158
+
159
+
The repository contains a [Docusaurus](https://docusaurus.io/) documentation site in the `website/` directory, deployed to [encryption4all.github.io/postguard](https://encryption4all.github.io/postguard/). It covers the architecture, encryption/decryption flow, Yivi integration, PKG server API, and WASM bindings in detail. The content from that site has been consolidated into this centralized documentation.
160
+
161
+
## Funding
162
+
163
+
Development of PostGuard was initially funded by the [Next Generation Internet initiative (NGI0)](https://nlnet.nl/NGI0/) and [NLnet](https://nlnet.nl/). The project is currently funded by a 4-year project from [NWO](https://www.nwo.nl/) under the name "Encryption 4 All".
0 commit comments