Expand description
JSON Advanced Electronic Signatures (JAdES).
Implements ETSI TS 119 182-1 — JWS-based AdES signatures with conformance levels from B-B (basic) through B-LTA (long-term archival).
§Conformance Levels
| Level | Description | Feature Required |
|---|---|---|
| JAdES-B-B | Basic: signature + signing time + signer cert | (always) |
| JAdES-B-T | + RFC 3161 signature timestamp (sigTst) | tsp |
| JAdES-B-LT | + certificate chain + revocation data | ltv |
| JAdES-B-LTA | + archive timestamp for indefinite validity | ltv |
§Serialization Forms
- JWS Compact — single string, B-B only (no unprotected headers)
- JWS JSON Flattened — single signer with
etsiUunprotected headers - JWS JSON General — multiple signers (rare for JAdES)
§Example
ⓘ
use jades::{sign_jades_bb, SignOptions};
use jades::signer::SoftwareSigner;
let signer = SoftwareSigner::from_p256(key, cert_chain)?;
let payload = b"Hello, JAdES!";
let opts = SignOptions::default();
let jws = sign_jades_bb(payload, &signer, &opts)?;Re-exports§
pub use error::JadesError;pub use remote::prepare_jades;pub use remote::PreparedJades;pub use sign::sign_jades_bb;pub use sign::JwsSerialization;pub use sign::SignOptions;pub use signer::JadesSigner;pub use signer::JwsAlgorithm;pub use verify::verify_jades;pub use verify::JadesValidationResult;pub use verify::VerifyOptions;pub use sign::sign_jades_bt;pub use sign::sign_jades_blt;pub use sign::sign_jades_blta;
Modules§
- error
- Error types for the jades crate.
- header
- ETSI TS 119 182-1 header parameters for JAdES.
- jws
- Minimal JWS (RFC 7515) implementation for JAdES.
- remote
- Three-phase remote signing for JAdES.
- sign
- JAdES signing API (B-B through B-LTA).
- signer
- JAdES signer abstraction and software implementation.
- verify
- JAdES verification API.
Structs§
- Trust
Store - Re-exported from
tsp-ltv: the trust store used byVerifyOptions::trust_storeto anchor signer and TSA certificate chains. A collection of trusted CA certificates.