Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 5 additions & 3 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ Snippets are pasted inline as fenced code blocks with a `<small>` source link un

Source repositories:

- `encryption4all/postguard-examples` (SvelteKit web app example)
- `encryption4all/postguard-tb-addon` (Thunderbird addon)
- `encryption4all/postguard-outlook-addon` (Outlook addon)
- `encryption4all/postguard-js` (pnpm workspace): `packages/pg-js` (SDK), `apps/website`, `apps/tb-addon`, `apps/outlook-addon`, `examples/*`
- `encryption4all/postguard` (Cargo workspace): `pg-core`, `pg-pkg`, `pg-cli`, `pg-ffi`, `cryptify`
- `encryption4all/postguard-dotnet` (.NET SDK)

The old `postguard-examples`, `postguard-website`, `postguard-tb-addon` and `postguard-outlook-addon` repositories are archived. Pinned-commit links already in the docs still resolve, but new snippets must come from the workspace paths above.

When adding or updating a snippet:

Expand Down
4 changes: 3 additions & 1 deletion docs/repos/cryptify.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# cryptify

[GitHub](https://github.com/encryption4all/cryptify) · Rust · File Sharing Service
[GitHub](https://github.com/encryption4all/postguard/tree/main/cryptify) · Rust · File Sharing Service

The source lives at `cryptify/` in the [postguard](https://github.com/encryption4all/postguard) Cargo workspace, compiled against the in-tree `pg-core`. The [cryptify](https://github.com/encryption4all/cryptify) repository still builds and publishes the `ghcr.io/encryption4all/cryptify` image; moving that is a separate ops change.

Cryptify is the file encryption and sharing service that PostGuard uses for delivering encrypted files. It allows encrypting any file with an identity attribute. Only people who can prove they have that attribute can decrypt and view the contents.

Expand Down
42 changes: 27 additions & 15 deletions docs/repos/overview.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Repository Overview

The PostGuard project is split across multiple repositories in the [encryption4all](https://github.com/encryption4all) GitHub organization. This page gives an overview of each repository and how they fit together.
The PostGuard project is split across several repositories in the [encryption4all](https://github.com/encryption4all) GitHub organization. This page gives an overview of each one and how they fit together.

Two of them are workspaces that hold more than one project. [postguard](/repos/postguard) is a Cargo workspace, and since [postguard#277](https://github.com/encryption4all/postguard/pull/277) the Cryptify backend is a member of it. [postguard-js](/repos/postguard-js) is a pnpm workspace holding the SDK, the three end-user apps and the examples. The `postguard-website`, `postguard-tb-addon`, `postguard-outlook-addon` and `postguard-examples` repositories were folded into it and are now archived, so read-only.

## Cryptographic Libraries

Expand All @@ -15,29 +17,36 @@ These are the low-level building blocks that implement the cryptographic primiti

## Core

The main PostGuard codebase and applications.
The main PostGuard codebase.

| Repository | Language | Description |
|---|---|---|
| [postguard](/repos/postguard) | Rust | Core library, PKG server, WASM bindings, CLI, FFI bindings |
| [postguard-website](/repos/postguard-website) | SvelteKit | Web frontend for encrypting and sending files |
| [postguard](/repos/postguard) | Rust | Core library, PKG server, WASM bindings, CLI, FFI bindings, and the Cryptify backend |
| [cryptify](/repos/cryptify) | Rust | File encryption and sharing service. The source now lives in `cryptify/` inside the postguard workspace; this repository still builds and publishes the container image |
| [postguard-business](/repos/postguard-business) | SvelteKit | Business portal for organization and API key management |
| [cryptify](/repos/cryptify) | Rust + TypeScript | File encryption and sharing service (backend + frontend) |
| [postguard-tb-addon](/repos/postguard-tb-addon) | TypeScript | Thunderbird email encryption extension |
| [postguard-outlook-addon](/repos/postguard-outlook-addon) | TypeScript | Outlook email encryption add-in |

## Applications

End-user applications, all in the [postguard-js](https://github.com/encryption4all/postguard-js) workspace under `apps/`.

| Application | Path | Language | Description |
|---|---|---|---|
| [postguard-website](/repos/postguard-website) | `apps/website` | SvelteKit | Web frontend for encrypting and sending files |
| [postguard-tb-addon](/repos/postguard-tb-addon) | `apps/tb-addon` | TypeScript | Thunderbird email encryption extension |
| [postguard-outlook-addon](/repos/postguard-outlook-addon) | `apps/outlook-addon` | TypeScript | Outlook email encryption add-in |

## SDKs

Client libraries for integrating PostGuard into applications.

| Repository | Language | Description |
|---|---|---|
| [postguard-js](/repos/postguard-js) | TypeScript | Browser and Node.js SDK (`@e4a/pg-js`) |
| [postguard-js](/repos/postguard-js) | TypeScript | Browser and Node.js SDK (`@e4a/pg-js`), at `packages/pg-js` in the workspace |
| [postguard-dotnet](/repos/postguard-dotnet) | C# | .NET SDK for sending-side encryption (`E4A.PostGuard`) |

## Examples

From the [postguard-examples](https://github.com/encryption4all/postguard-examples) repository:
In the [postguard-js](https://github.com/encryption4all/postguard-js) workspace under `examples/`, built against the in-tree SDK:

| Project | Language | Description |
|---|---|---|
Expand All @@ -48,22 +57,25 @@ From the [postguard-examples](https://github.com/encryption4all/postguard-exampl

## Dependency Graph

The repositories depend on each other roughly as follows:
The projects depend on each other roughly as follows. Names in parentheses are workspace members rather than separate repositories.

```
pg-curve
└── ibe
└── postguard (pg-core)
├── pg-wasm ──────────────── postguard-js (@e4a/pg-js)
│ ├── postguard-website
│ ├── postguard-tb-addon
│ └── postguard-outlook-addon
├── pg-wasm ──────────────── postguard-js (packages/pg-js)
│ ├── apps/website
│ ├── apps/tb-addon
│ └── apps/outlook-addon
├── pg-ffi ───────────────── postguard-dotnet
├── pg-pkg (PKG server)
├── cryptify (file storage)
└── pg-cli
└── ibs (used by pg-core for sender signatures)

irmars (Yivi client) ──── postguard (pg-core, pg-pkg, pg-cli)

cryptify (backend) ─────── postguard-website (file storage)
cryptify (backend) ─────── apps/website (file storage)
```

Because `cryptify` and `pg-core` are now members of one Cargo workspace, they resolve a single `Cargo.lock`. Before the merge each repository resolved its own, so the two services could serialize container headers with different versions of the same serializer.
4 changes: 2 additions & 2 deletions docs/repos/pg-dotnet.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# pg-dotnet

[GitHub](https://github.com/encryption4all/postguard-examples/tree/main/pg-dotnet) · C# · .NET Example
[GitHub](https://github.com/encryption4all/postguard-js/tree/main/examples/pg-dotnet) · C# · .NET Example

A .NET console application demonstrating the [postguard-dotnet](/repos/postguard-dotnet) SDK for the "Informatierijk notificeren" use case. Part of the [postguard-examples](https://github.com/encryption4all/postguard-examples) repository.
A .NET console application demonstrating the [postguard-dotnet](/repos/postguard-dotnet) SDK for the "Informatierijk notificeren" use case. Lives at `examples/pg-dotnet` in the [postguard-js](https://github.com/encryption4all/postguard-js) workspace. The `postguard-examples` repository is archived.

It shows two patterns:

Expand Down
4 changes: 2 additions & 2 deletions docs/repos/pg-manual.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# pg-manual

[GitHub](https://github.com/encryption4all/postguard-examples/tree/main/pg-manual) · JavaScript · WASM Example
[GitHub](https://github.com/encryption4all/postguard-js/tree/main/examples/pg-manual) · JavaScript · WASM Example

A webpack-bundled browser example that uses the low-level `@e4a/pg-wasm` module directly, without the `@e4a/pg-js` SDK. Part of the [postguard-examples](https://github.com/encryption4all/postguard-examples) repository.
A webpack-bundled browser example that uses the low-level `@e4a/pg-wasm` module directly, without the `@e4a/pg-js` SDK. Lives at `examples/pg-manual` in the [postguard-js](https://github.com/encryption4all/postguard-js) workspace. The `postguard-examples` repository is archived.

Use this example when you want to see what `@e4a/pg-js` wraps. It calls the WASM bindings, the PKG HTTP API, and a Yivi popup directly. For application code, prefer the SDK shown in [pg-sveltekit](/repos/pg-sveltekit); the manual flow is here for reference and for projects that cannot use the SDK.

Expand Down
4 changes: 2 additions & 2 deletions docs/repos/pg-node.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# pg-node

[GitHub](https://github.com/encryption4all/postguard-examples/tree/main/pg-node) · JavaScript · Node.js Example
[GitHub](https://github.com/encryption4all/postguard-js/tree/main/examples/pg-node) · JavaScript · Node.js Example

A plain Node.js CLI example showing how to use [`@e4a/pg-js`](/repos/postguard-js) from a server runtime. Part of the [postguard-examples](https://github.com/encryption4all/postguard-examples) repository.
A plain Node.js CLI example showing how to use [`@e4a/pg-js`](/repos/postguard-js) from a server runtime. Lives at `examples/pg-node` in the [postguard-js](https://github.com/encryption4all/postguard-js) workspace and builds against the in-tree SDK. The `postguard-examples` repository is archived.

Mirrors the [pg-sveltekit](/repos/pg-sveltekit) "Informatierijk notificeren" flow (citizen exact-email recipient + organisation email-domain recipient) as a CLI script.

Expand Down
4 changes: 2 additions & 2 deletions docs/repos/pg-sveltekit.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# pg-sveltekit

[GitHub](https://github.com/encryption4all/postguard-examples/tree/main/pg-sveltekit) · TypeScript · SvelteKit Example
[GitHub](https://github.com/encryption4all/postguard-js/tree/main/examples/pg-sveltekit) · TypeScript · SvelteKit Example

A SvelteKit application demonstrating PostGuard file encryption and decryption in a web browser using `@e4a/pg-js`. Part of the [postguard-examples](https://github.com/encryption4all/postguard-examples) repository.
A SvelteKit application demonstrating PostGuard file encryption and decryption in a web browser using `@e4a/pg-js`. Lives at `examples/pg-sveltekit` in the [postguard-js](https://github.com/encryption4all/postguard-js) workspace and builds against the in-tree SDK. The `postguard-examples` repository is archived.

## Running

Expand Down
4 changes: 3 additions & 1 deletion docs/repos/postguard-outlook-addon.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# postguard-outlook-addon

[GitHub](https://github.com/encryption4all/postguard-outlook-addon) · TypeScript · Outlook Add-in
[GitHub](https://github.com/encryption4all/postguard-js/tree/main/apps/outlook-addon) · TypeScript · Outlook Add-in

Lives at `apps/outlook-addon` in the [postguard-js](https://github.com/encryption4all/postguard-js) workspace, which also builds and publishes its images. The standalone `postguard-outlook-addon` repository is archived.

Identity-based email encryption add-in for Microsoft Outlook. Built as an Office Web Add-in using Office.js, PostGuard WASM, and Yivi authentication. Targets new Outlook on Windows (WebView2), Outlook on the web, and Outlook on macOS (taskpane flow only), Mailbox 1.12+. The one-click OnSend flow runs on Windows and the web; Outlook for Mac native uses the taskpane "Encrypt & Send" button instead. See the per-platform matrix below.

Expand Down
4 changes: 3 additions & 1 deletion docs/repos/postguard-tb-addon.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# postguard-tb-addon

[GitHub](https://github.com/encryption4all/postguard-tb-addon) · TypeScript · Thunderbird Extension
[GitHub](https://github.com/encryption4all/postguard-js/tree/main/apps/tb-addon) · TypeScript · Thunderbird Extension

Lives at `apps/tb-addon` in the [postguard-js](https://github.com/encryption4all/postguard-js) workspace. The standalone `postguard-tb-addon` repository is archived.

End-to-end email encryption extension for Mozilla Thunderbird. Uses identity-based encryption via [Yivi](https://yivi.app) so users can send and receive encrypted emails without managing keys.

Expand Down
4 changes: 3 additions & 1 deletion docs/repos/postguard-website.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# postguard-website

[GitHub](https://github.com/encryption4all/postguard-website) · SvelteKit · Web Application
[GitHub](https://github.com/encryption4all/postguard-js/tree/main/apps/website) · SvelteKit · Web Application

Lives at `apps/website` in the [postguard-js](https://github.com/encryption4all/postguard-js) workspace. The standalone `postguard-website` repository is archived.

The PostGuard web frontend for encrypting and sending files. Users pick files, choose recipients by email address, authenticate with [Yivi](https://yivi.app), and the files are encrypted and uploaded to [Cryptify](/repos/cryptify) for delivery. Built with SvelteKit using the static adapter.

Expand Down
4 changes: 2 additions & 2 deletions docs/sdk/js-encryption.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,9 @@ The upload is silent by default. Both recipient and sender mails are opt-in. Pas
| `message` | `string` | `undefined` | Optional unencrypted text included in any mail sent |
| `language` | `'EN' \| 'NL'` | `'EN'` | Notification email template language |

The SDK validates the `notify` shape and throws `TypeError` for common misuse like `{ notify: true }`, a top-level `recipients`, or non-boolean values such as `{ recipients: 'yes' }`. Catch this in tests rather than at runtime.
There is no runtime validator on the `notify` shape, so a wrong shape fails quietly. `{ notify: true }` is the one to watch: `delivery?.recipients` on a boolean is `undefined`, the wire field `notifyRecipients` falls back to `false`, and no mail is sent. It is worse than omitting `notify`, because it also counts as an explicit choice and so suppresses the notice below. Write `{ notify: { recipients: true } }`.

If `notify` is omitted on the first `sealed.upload()` for a given `PostGuard` instance, the SDK logs a one-time `console.info` reminding you that the upload is silent and how to opt in. Pass `{ recipients: false }` to acknowledge the silent intent and suppress the notice — the validator counts both as explicit shapes.
If `notify` is omitted on the first `sealed.upload()` for a given `PostGuard` instance, the SDK logs a one-time `console.info` reminding you that the upload is silent and how to opt in. Passing `notify` at all suppresses that notice, so use `{ recipients: false }` when you mean silence.

## Encrypt raw data

Expand Down
Loading