Skip to content

Commit 8e7966a

Browse files
rayketchamclaude
andcommitted
refactor: v0.6.0 — drop CMS encryption + ERS scope creep
Remove pkcs7/enveloped.rs, pkcs7/ecdh.rs, pkcs7/kem.rs, crypto/rsa_oaep.rs, crypto/hkdf.rs, ers.rs (~4.7k LOC out). A signing service should not carry encryption or archive long-term-validity surface. POST /api/v1/sign-detached (CMS SignedData via Pkcs7Builder::new_detached) already covers the 'wrap any file for transport + later verify' workflow — EnvelopedData had zero external callers. Dep graph drops aes-gcm, aes, aes-kw, cbc, hkdf, and the ecdh feature from p256/p384/p521. Roadmap renumbered: v0.6 -> v0.7 (structural clean-up), v0.7 -> v0.8 (hybrid /composite). Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 6ef22b9 commit 8e7966a

15 files changed

Lines changed: 27 additions & 4826 deletions

File tree

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.6.0] - 2026-04-19
11+
12+
### Removed
13+
- **CMS EnvelopedData encryption surface**`pkcs7/enveloped.rs`, `pkcs7/ecdh.rs`, `pkcs7/kem.rs`, `crypto/rsa_oaep.rs`, `crypto/hkdf.rs` deleted (~3.3k LOC). This is a signing service, not a key-agreement / confidentiality product. `POST /api/v1/sign-detached` (CMS SignedData via `Pkcs7Builder::new_detached()`) already covers the "wrap any file for transport + later verify" workflow. Dep graph drops `aes-gcm`, `aes`, `aes-kw`, `cbc`, `hkdf`, and the `ecdh` feature from p256/p384/p521.
14+
- **RFC 4998 Evidence Record Syntax (`ers.rs`)**~1.4k LOC removed. Long-term archive timestamps are a separate product scope; this repo ships RFC 3161 client + TSA server only.
15+
16+
### Changed
17+
- Roadmap renumbered: v0.6 → v0.7 (structural clean-up), v0.7 → v0.8 (hybrid/composite).
18+
1019
## [0.5.11] - 2026-04-19
1120

1221
### Fixed

Cargo.lock

Lines changed: 1 addition & 88 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ resolver = "2"
33
members = ["crates/pki-sign"]
44

55
[workspace.package]
6-
version = "0.5.11"
6+
version = "0.6.0"
77
edition = "2021"
88
rust-version = "1.88"
99
license = "Apache-2.0"

README.md

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ No OpenSSL. No `signtool.exe`. No external dependencies. One binary.
2222
[![OpenSSL](https://img.shields.io/badge/OpenSSL-not%20required-brightgreen?logo=openssl&logoColor=white)](https://github.com/rayketcham-lab/PKI-Signing-Service)
2323

2424
<!-- Project Info -->
25-
[![Version](https://img.shields.io/badge/version-0.5.11-blue?logo=semver&logoColor=white)](https://github.com/rayketcham-lab/PKI-Signing-Service/releases/latest)
25+
[![Version](https://img.shields.io/badge/version-0.6.0-blue?logo=semver&logoColor=white)](https://github.com/rayketcham-lab/PKI-Signing-Service/releases/latest)
2626
[![License: Apache-2.0](https://img.shields.io/badge/license-Apache--2.0-green?logo=apache&logoColor=white)](LICENSE)
2727
[![Rust](https://img.shields.io/badge/language-Rust-orange?logo=rust&logoColor=white)](https://www.rust-lang.org/)
2828
[![MSRV](https://img.shields.io/badge/MSRV-1.88-orange?logo=rust&logoColor=white)](https://blog.rust-lang.org/)
@@ -74,7 +74,6 @@ No OpenSSL. No `signtool.exe`. No external dependencies. One binary.
7474
- **Concurrency limit** --- Global ceiling on in-flight signing requests (`rate_limit_rps`, default 10) to bound CPU exhaustion
7575
- **CIDR-aware reverse-proxy trust** --- Only whitelisted CIDRs may set `X-Forwarded-For` / `X-Real-IP`
7676
- **Cosign-signed releases** --- Every release artifact ships with a self-contained `.cosign-bundle` (signature + certificate) for supply-chain verification
77-
- **Evidence Record Syntax** --- RFC 4998 long-term archive timestamps
7877
- **Static binary** --- `x86_64-unknown-linux-musl` target, zero runtime dependencies
7978

8079
> [!TIP]
@@ -398,7 +397,7 @@ Compatible with any RFC 3161 client --- `signtool.exe`, `openssl ts`, or this to
398397
## CLI Reference
399398

400399
```
401-
pki-sign 0.5.11
400+
pki-sign 0.6.0
402401
PKI Signing Service - Pure Rust Code Signing Engine
403402
404403
USAGE:
@@ -458,9 +457,8 @@ COMMANDS:
458457
│ Authenticode │ │ │ │ │
459458
│ hash compute │ │ SignedData │ │ TSA client │
460459
│ sig embed │ │ DigestedData │ │ failover │
461-
│ cert table │ │ EnvelopedData │ └──────────────┘
462-
└────────────────┘ │ ECDH / KEM │
463-
└────────────────┘
460+
│ cert table │ │ │ └──────────────┘
461+
└────────────────┘ └────────────────┘
464462
```
465463

466464
### Modules
@@ -470,15 +468,13 @@ COMMANDS:
470468
| `pe/` | PE/COFF parser, Authenticode hash, signature embedding |
471469
| `cab` | Cabinet archive parser and Authenticode signer |
472470
| `msi` | MSI compound-document parser and Authenticode signer |
473-
| `pkcs7/` | CMS/PKCS#7 ASN.1 builder --- SignedData, DigestedData, EnvelopedData, ECDH, KEM |
471+
| `pkcs7/` | CMS/PKCS#7 ASN.1 builder --- SignedData, DigestedData, ESS signed attributes |
474472
| `signer` | Signing orchestrator --- PFX load, file type detection, pipeline coordination |
475473
| `verifier` | Signature verification --- digest comparison, chain validation, EKU checking |
476474
| `timestamp` | RFC 3161 TSA client with failover across multiple servers |
477475
| `tsa_http` | Standalone TSA HTTP server |
478476
| `tsa_server` | TSA token generation engine |
479-
| `ers` | Evidence Record Syntax (RFC 4998) --- long-term archive timestamps |
480477
| `powershell` | PowerShell script signing with Base64 PKCS#7 blocks |
481-
| `crypto/` | HKDF key derivation, RSA-OAEP encryption |
482478
| `web/` | axum HTTP server, LDAP middleware, audit logging, admin API |
483479
| `config` | TOML configuration with env var and CLI overrides |
484480

@@ -558,15 +554,16 @@ The project is stable for Authenticode, detached CMS, and RFC 3161 signing workl
558554

559555
### Recently shipped
560556

557+
- **Scope trim (v0.6.0)** --- removed CMS EnvelopedData (encryption: ECDH, ML-KEM, RSA-OAEP key transport) and RFC 4998 Evidence Record Syntax. This is a signing service, not a key-agreement / long-term-archive product. `sign-detached` (CMS SignedData) already covers the "wrap any file for transport + later verify" workflow. ~4.7k LOC and five supporting crates gone from the dep graph.
561558
- **Feature-gate ML-DSA behind `pq-experimental`** ([#72](https://github.com/rayketcham-lab/PKI-Signing-Service/issues/72)) --- default builds drop the `ml-dsa` / `slh-dsa` dependencies entirely; post-quantum opt-in via `cargo build --features pq-experimental`. The `default_build_cargo_tree_omits_ml_dsa` test pins the invariant.
562559
- **CSRF Origin guard** ([#19](https://github.com/rayketcham-lab/PKI-Signing-Service/issues/19)) --- state-changing routes now reject cross-origin browser POSTs; `trusted_origins` allowlist with same-origin fallback.
563560
- **Supply-chain regression floor** --- Cargo.lock-parsed tests pin `rustls-webpki ≥ 0.103.12`, `rustls ≥ 0.23.37`, `ring ≥ 0.17.14`; cosign guard-loop regression test catches silent unsigned-asset ships.
564561

565-
### v0.6 --- Structural clean-up
562+
### v0.7 --- Structural clean-up
566563

567564
- **Decompose `signer.rs` / `verifier.rs` monoliths** ([#55](https://github.com/rayketcham-lab/PKI-Signing-Service/issues/55)) --- extract PFX loading and cert-validation helpers into dedicated modules without public-API churn.
568565

569-
### v0.7 --- Hybrid / composite certificates
566+
### v0.8 --- Hybrid / composite certificates
570567

571568
- **Dual-sign PKCS#7** ([#22](https://github.com/rayketcham-lab/PKI-Signing-Service/issues/22) phase 2) --- same PKCS#7 envelope carries an RSA or ECDSA signature *and* an ML-DSA counter-signature, so a downstream verifier with either capability can validate.
572569
- **Composite signatures (NIST SP 800-227)** ([#22](https://github.com/rayketcham-lab/PKI-Signing-Service/issues/22) phase 3) --- single certificate carrying both a classical and a PQ key; tracks the NIST composite-signature spec as it finalizes.

crates/pki-sign/Cargo.toml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,13 @@ sha1 = "0.10"
4848
sha2 = { version = "0.10", features = ["oid"] }
4949
sha3 = "0.10"
5050
rsa = "0.9"
51-
p256 = { version = "0.13", features = ["ecdsa", "pem", "ecdh"] }
52-
p384 = { version = "0.13", features = ["ecdsa", "pem", "ecdh"] }
53-
p521 = { version = "0.13", features = ["ecdsa", "pem", "ecdh"] }
51+
p256 = { version = "0.13", features = ["ecdsa", "pem"] }
52+
p384 = { version = "0.13", features = ["ecdsa", "pem"] }
53+
p521 = { version = "0.13", features = ["ecdsa", "pem"] }
5454
ed25519-dalek = { version = "2", features = ["pkcs8"] }
5555
ml-dsa = { version = "0.0.4", features = ["pkcs8"], optional = true }
5656
signature = "2"
5757
pkcs8 = { version = "0.10", features = ["pem"] }
58-
hkdf = "0.12"
5958

6059
# ASN.1/DER encoding for CMS/PKCS#7
6160
der = { workspace = true }
@@ -64,12 +63,6 @@ x509-cert = "0.2"
6463
const-oid = "0.9"
6564
spki = "0.7"
6665

67-
# S/MIME content encryption
68-
aes-gcm = "0.10"
69-
cbc = { version = "0.1", features = [] }
70-
aes = { version = "0.8", features = ["zeroize"] }
71-
aes-kw = "0.2"
72-
7366
# PKCS#12/PFX loading
7467
p12 = "0.6"
7568
p12-keystore = { workspace = true }

0 commit comments

Comments
 (0)