惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

小众软件
小众软件
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Y
Y Combinator Blog
V
Visual Studio Blog
The Cloudflare Blog
S
SegmentFault 最新的问题
博客园 - 叶小钗
Stack Overflow Blog
Stack Overflow Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
aimingoo的专栏
aimingoo的专栏
宝玉的分享
宝玉的分享
H
Help Net Security
T
Tailwind CSS Blog
IT之家
IT之家
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
G
Google Developers Blog
M
MIT News - Artificial intelligence
酷 壳 – CoolShell
酷 壳 – CoolShell
Martin Fowler
Martin Fowler
博客园_首页
C
Cisco Blogs
The GitHub Blog
The GitHub Blog
Latest news
Latest news
P
Proofpoint News Feed
Project Zero
Project Zero
T
The Blog of Author Tim Ferriss
S
Securelist
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
L
LINUX DO - 热门话题
博客园 - Franky
V2EX - 技术
V2EX - 技术
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
O
OpenAI News
Google DeepMind News
Google DeepMind News
Recent Announcements
Recent Announcements
The Register - Security
The Register - Security
Attack and Defense Labs
Attack and Defense Labs
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
F
Full Disclosure
WordPress大学
WordPress大学
Recorded Future
Recorded Future
N
News and Events Feed by Topic
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Hacker News - Newest:
Hacker News - Newest: "LLM"
Vercel News
Vercel News
P
Proofpoint News Feed
Webroot Blog
Webroot Blog
博客园 - 聂微东
TaoSecurity Blog
TaoSecurity Blog

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
Digital signatures: format, certificate, and validation policy — three layers people constantly mix up
Juan Torchia · 2026-05-29 · via DEV Community

Digital signatures: format, certificate, and validation policy — three layers people constantly mix up

I was deep in a validation error that made no sense. The cryptography was fine — I'd checked the hash, the algorithm, the key length. Three hours in, I found the actual problem: the document was CAdES-BES and the receiving system expected CAdES-LT. No timestamp, no embedded revocation material. The validator returned INVALID and I'd spent the whole morning looking in completely the wrong place.

My thesis is straightforward: most digital signature errors aren't cryptographic problems. They're format or validation policy problems. And the instinct to dive straight into algorithms and keys is the thing that costs you hours.


The three layers you need to separate

The confusion starts when people treat "digital signature" as a single thing. It isn't. It's three independent layers that can fail for completely different reasons.

Layer 1 — The document format

The format defines how the signature is packaged with the document. In European and regulated ecosystems, the main ones are:

  • CAdES (CMS Advanced Electronic Signatures): for arbitrary binary data, common in backend systems.
  • XAdES (XML Advanced Electronic Signatures): for XML documents, with variants that let you sign specific nodes.
  • PAdES (PDF Advanced Electronic Signatures): embedded in PDF, with long-term validation support built in.
  • JAdES (JSON Advanced Electronic Signatures): the newest, for JSON-based flows.

Each format has internal profiles: BES, T, LT, LTA. T adds a timestamp. LT embeds revocation material (OCSP or CRL). LTA timestamps the validation material itself.

A CAdES-BES signature sent to a system expecting CAdES-LT returns INVALID — even with perfect cryptography, a valid certificate, and a correct hash. The format mismatch kills it before the cryptographic check matters.

Layer 2 — The certificate

The certificate is the signer's identity. Typical failure modes:

  • Incomplete chain: the signer's cert is valid, but the validator's trust store doesn't have the root CA.
  • Revocation: the cert was revoked and the validator checks OCSP or CRL. If the revocation endpoint doesn't respond, depending on policy that can be an error or just a warning.
  • Key Usage: digitalSignature isn't explicitly set.
  • Signing time outside validity period: the cert expired between signing and validation, and there's no timestamp to anchor the signature to the moment it was still valid.

Layer 3 — The validation policy

This is where most people get genuinely lost. A validation policy is a set of rules defining what counts as "valid" for a specific context. It is not universal.

eIDAS (Regulation EU 910/2014) defines signature levels — Simple, Advanced, Qualified — but the concrete rules of what a system actually checks depend on the policy configured in the validator. Two systems both implementing eIDAS can reach different verdicts on the same signature if their policies differ. That's not a bug. It's intentional.


Diagnosis checklist: run this before touching cryptographic code

1. Does the validator give a detailed diagnostic or just "INVALID"?
   → If only INVALID, step one is getting the full report.

2. Does the document format match what the receiver expects?
   → CAdES / XAdES / PAdES / JAdES
   → Which profile? BES / T / LT / LTA

3. Is the certificate chain complete?
   → Does the validator's trust store include the root CA of the issuer?

4. Was the certificate valid at the time of signing?
   → Without a timestamp, "time of signing" is ambiguous to the validator.

5. Was the revocation endpoint (OCSP/CRL) reachable when validation ran?
   → An OCSP timeout can be treated as unknown revocation status.

6. Does the receiver's validation policy require something the signature doesn't include?
   → Timestamp? Embedded revocation material? Specific CA?

Only after going through all six without finding the problem should you look at cryptography: hash, algorithm, key length.

DSS from the European Commission: what it tells you and what it doesn't

The reference library for this ecosystem is DSS (Digital Signature Service), maintained by the European Commission. Documentation: https://ec.europa.eu/digital-building-blocks/DSS/webapp-demo/doc/dss-documentation.html.

DSS supports all four formats and their profiles, and it exposes a validator that returns a detailed report in XML or JSON with per-layer diagnostics. It's Java, open source (LGPL), and it's the engine behind several national European validators.

What DSS tells you: how each format is structured, what each profile expects, what the validator checks at each step.

What DSS doesn't tell you: which validation policy is mandatory for your specific use case. That's defined by local regulation, the contract with the receiver, or the technical spec of the consuming system. DSS gives you the tool; the correct policy you have to source separately.

A reproducible Java example with DSS

// Load the signed document (CAdES example)
DSSDocument signedDocument = new FileDocument("signed-document.p7s");

// Configure certificate and revocation sources
CertificateVerifier verifier = new CommonCertificateVerifier();
// Add trust store with the root CAs you want to accept
verifier.setTrustedCertSources(trustedCertificateSource);
// Configure online OCSP source (optional, can be offline)
verifier.setOcspSource(new OnlineOCSPSource());

// Create the validation service
DocumentValidator validator = new CMSDocumentValidator(signedDocument);
validator.setCertificateVerifier(verifier);

// Run validation with default EIDAS_MODEL policy
Reports reports = validator.validateDocument();

// The diagnostic is in the detailed report
DiagnosticData diagnosticData = reports.getDiagnosticData();
SimpleReport simpleReport = reports.getSimpleReport();

// Per signature: indication, sub-indication, and errors/warnings
for (String signatureId : simpleReport.getSignatureIdList()) {
    System.out.println("Indication: " + simpleReport.getIndication(signatureId));
    System.out.println("Sub-indication: " + simpleReport.getSubIndication(signatureId));
    // The errors tell you exactly which layer failed
    simpleReport.getErrors(signatureId).forEach(System.out::println);
}

The important thing isn't the code itself — DSS documentation covers that. It's the sub-indication. When getIndication returns INDETERMINATE or INVALID, getSubIndication tells you whether the problem is NO_CERTIFICATE_CHAIN_FOUND, REVOKED_NO_POE, SIG_CONSTRAINTS_FAILURE, or one of the other codes defined in ETSI EN 319 102-1. Each one points to a different layer. That's the diagnostic, not the top-level result.


The errors that actually cost hours

Error 1: Chasing the algorithm when the problem is the profile

CAdES-BES sent to a system expecting CAdES-LT returns INDETERMINATE / NO_POE. The automatic reading is "cryptography problem." The actual fix is upgrading the signature profile to include revocation material — nothing to do with the algorithm.

Error 2: Assuming a "valid" certificate is sufficient

A cert can pass chain verification and revocation checking but have Key Usage without digitalSignature set. DSS reports this as SIG_CONSTRAINTS_FAILURE. The certificate is current; the signature is still invalid.

Error 3: Ignoring the validator's trust store

If the validator uses the European LOTL as its trust anchor, it only recognizes certificates from CAs that appear in that list. A perfectly valid certificate from a CA outside the LOTL gives NO_CERTIFICATE_CHAIN_FOUND. That's not an error in the signature — it's a validator misconfiguration or a policy incompatibility.

Error 4: Conflating technical validation with legal validation

DSS can return TOTAL-PASSED under a given policy. That doesn't mean the signature has legal validity in a specific jurisdiction. Qualified eIDAS signatures require the certificate to come from a QTSP listed in the LOTL. A technical validator doesn't replace legal analysis.


Limits of what you can conclude without real data

Being honest about the edges of this analysis:

  • You can't determine the correct policy for a specific case from general documentation alone. The policy is defined by the receiver or applicable regulation and can vary between systems implementing the same standard.
  • The code examples are illustrative, not production configurations. Real implementations need error handling, OCSP timeout settings, revocation caching, and explicit decisions about what to do when revocation services don't respond.
  • DSS sub-indications are precise for what DSS verifies, but if the receiver uses a different validator, results may differ. Interoperability between validators is an open problem in this ecosystem.
  • eIDAS is European. For other regulatory contexts — NIST, PKCS#11 in Latin American banking, etc. — the layers are analogous but the policy specifics change.

The reference table I use as a first orientation:

Validator result First layer to check
NO_CERTIFICATE_CHAIN_FOUND Trust store / intermediate certificates
REVOKED_NO_POE Timestamp / revocation moment
SIG_CONSTRAINTS_FAILURE Key Usage / required signature profile
FORMAT_FAILURE Document format (CAdES/XAdES/PAdES/JAdES)
EXPIRED without timestamp T or LT profile to anchor the date
HASH_FAILURE Only now look at cryptography

FAQ

What's the practical difference between CAdES, XAdES, and PAdES?

The format depends mainly on document type. CAdES handles arbitrary binary data. XAdES handles XML where you may need to sign specific nodes. PAdES is for PDFs with built-in longevity and visual support. The choice isn't free — it's defined by the receiving system.

What is an LT profile and why does it matter?

LT (Long-Term) means the signature embeds revocation material at signing time. This lets you validate the signature years later without depending on revocation endpoints from that moment still being alive. It's mandatory in many regulated contexts for exactly this reason.

Why can a valid certificate produce an invalid signature?

Because currency and validity for signing are different things. A certificate can be current but have wrong Key Usage, come from a CA not in the validator's trust store, or have been issued after the recorded signing moment. Necessary, not sufficient.

What is the LOTL?

The LOTL (List of Trusted Lists) is an XML document maintained by the European Commission referencing national lists of qualified trust service providers from each member state. Validators implementing eIDAS use it as a trust anchor. Publicly available at https://ec.europa.eu/tools/lotl/eu-lotl.xml.

What does INDETERMINATE vs INVALID mean in DSS?

INVALID is a definitive failure: the cryptography doesn't hold, the certificate was revoked at signing time, or there's a hard constraint violation. INDETERMINATE means validity can't be determined with the available information — no timestamp to anchor the signing moment, revocation service didn't respond. INDETERMINATE is not synonymous with invalid: in some cases it resolves by adding validation material or adjusting the applied policy.

Does it make sense to ship digital signature code without understanding these three layers?

You can get away with it until interoperability or legal validation breaks. When it does, the wrong diagnosis — looking at cryptography when the problem is policy — is what turns a ten-minute fix into a three-hour one.


The layer to check first isn't the obvious one

The instinct to go straight to cryptography when a signature fails is understandable. It's also almost always wrong.

What I do accept from DSS and the eIDAS ecosystem: the layer separation isn't academic overhead, it's a diagnostic tool. Knowing the sub-indication tells you exactly where to look.

What I don't accept: the framing that digital signature implementation is mainly about choosing the right algorithm. The algorithm is rarely the problem. The validation policy, the misconfigured trust store, and the wrong signature profile are what actually fail in practice — and none of them surface if you're only looking at cryptography.

The concrete next step: set up DSS in standalone mode, take a signature you already have, run the validation, and read the full XML report. Not the simpleReport — the detailedReport. That's where the per-layer diagnostic lives, the one that saves the three hours.

If this kind of layer-based diagnosis feels familiar from other contexts, it should — there's something structurally similar in distributed tracing: the top-level indicator says OK, the trace shows where it actually broke. The pattern of a misleading high-level result hiding a layer-specific failure shows up across a lot of systems.


Original source:


This article was originally published on juanchi.dev