Add OpenPGP public key server support
- Add VKS and HTTPS HKP lookup and publication with bounded, validated requests. - Add desktop key-server settings, lookup/import flow, and per-publication native confirmation. - Keep discovered keys untrusted and update architecture, encryption, and user documentation. - Add mocked server protocol and key-store tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -70,6 +70,7 @@ The current architecture takes a strict trust split:
|
||||
This boundary is important for encryption and safety checks:
|
||||
|
||||
- OpenPGP key selection and trust updates are confirmed in the main process.
|
||||
- Key-server lookup results never elevate trust; only the public key is sent during a separately confirmed publication.
|
||||
- Send-time downgrade checks happen in the main process rather than only in UI logic.
|
||||
- External links open only after a native confirmation dialog.
|
||||
- Credentials and private keys are stored with the OS keyring, not in plain JSON files.
|
||||
@@ -80,10 +81,13 @@ The OpenPGP implementation is split into focused modules:
|
||||
|
||||
- `desktop/pgp-keystore.cjs` stores contacts, trust, key material, and settings.
|
||||
- `desktop/pgp-mail.cjs` handles message detection, decryption, verification, encryption, and signature checks.
|
||||
- `desktop/pgp-keyservers.cjs` implements bounded HTTPS lookup and publication for VKS and HKP-compatible servers.
|
||||
- `desktop/main.cjs` bridges those services into the Electron IPC API.
|
||||
|
||||
This keeps the cryptographic logic separate from the UI and gives the app a single place to enforce trust rules, passphrase checks, and recipient validation.
|
||||
|
||||
Key-server searches and publication requests are initiated from Settings and resolved by the main process. The renderer selects a configured server by ID rather than supplying an arbitrary request URL. Custom HTTPS endpoints require a native confirmation when added; redirects and oversized responses are rejected. Returned keys are validated and remain untrusted until the user verifies their fingerprints out of band. Publishing sends only public key material and requires a native confirmation for each publication.
|
||||
|
||||
## 5. Data flow patterns
|
||||
|
||||
- Account setup and edits flow from the UI into IPC, then into the encrypted main-process storage.
|
||||
|
||||
Reference in New Issue
Block a user