Skip to main content

Crate jades

Crate jades 

Source
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

LevelDescriptionFeature Required
JAdES-B-BBasic: signature + signing time + signer cert(always)
JAdES-B-T+ RFC 3161 signature timestamp (sigTst)tsp
JAdES-B-LT+ certificate chain + revocation dataltv
JAdES-B-LTA+ archive timestamp for indefinite validityltv

§Serialization Forms

  • JWS Compact — single string, B-B only (no unprotected headers)
  • JWS JSON Flattened — single signer with etsiU unprotected 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§

TrustStore
Re-exported from tsp-ltv: the trust store used by VerifyOptions::trust_store to anchor signer and TSA certificate chains. A collection of trusted CA certificates.