Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aVuxyNKwrPhbE0SH@donburi.himad.notcom.org>
Date: Mon, 5 Jan 2026 14:52:39 +0200
From: Valtteri Vuorikoski <vuori@...com.org>
To: oss-security@...ts.openwall.com
Subject: Re: Re: Best practices for signature verifcation

On Sun, Jan 04, 2026 at 11:56:06AM +0000, Peter Gutmann wrote:
> As an aside, is anyone aware of a single-source design document for what
> Authenticode does?   There's a million web pages related to the business of
> selling signing certs, and less than a million on using it, but I can't find a
> single-source design doc, just lots of stuff in various places that I've
> picked up over the years.  By "single-source doc" I mean something that
> addresses all of the above issues and related ones in one place.

Are you looking for something more detailed than the Microsoft document titled
"Windows Authenticode Portable Executable Signature Format" from 2008?

Download from the horse's mouth:
<https://download.microsoft.com/download/9/c/5/9c5b2167-8017-4bae-9fde-d599bac8184a/authenticode_pe.docx>)

Here is the overview section of that document (via pandoc -t rst):

Overview
========

The Authenticode signature in a PE file is in a PKCS #7 **SignedData**
structure. The signature asserts that:

-  The file originates from a specific software publisher.

-  The file has not been altered since it was signed.

The signature itself does not convey any information about the intent or
quality of the software. However, signatures that are associated with
programs such as the Windows Logo Program—that sign software only if it
passes certain tests—can convey quality information.

A PKCS #7 **SignedData** structure contains the PE file's hash value, a
signature created by the software publisher’s private key, and the X.509
v3 certificates that bind the software publisher’s signing key to a
legal entity. A PKCS #7 **SignedData** structure can optionally contain:

-  A description of the software publisher.

-  The software publisher's URL.

-  An Authenticode timestamp.

The timestamp is generated by a timestamping authority (TSA) and asserts
that a publisher’s signature existed before the specified time. The
timestamp extends the lifetime of the signature when a signing
certificate expires or is later revoked.

Authenticode signatures can be “embedded” in a Windows PE file, in a
location specified by the **Certificate Table** entry in **Optional
Header Data Directories**. When Authenticode is used to sign a Windows
PE file, the algorithm that calculates the file's Authenticode hash
value excludes certain PE fields. When embedding the signature in the
file, the signing process can modify these fields without affecting the
file's hash value.

Figure 1 provides a simplified overview of how an Authenticode signature
is included in a Windows PE file. It includes the location of the
embedded Authenticode signature and specifies which PE fields are
excluded when calculating the PE file's hash value.

For details about the PE file structure, see ”Microsoft Portable
Executable and Common Object File Format Specification” (PE/COFF
specification).

For details on the PKCS #7 portion of the Authenticode signature see the
Abstract Syntax Notation version 1 (ASN.1) structure definitions later
in this paper.

For details on how the Authenticode PE hash value is calculated, see
“Calculating the PE Image Hash” later in this paper.

Powered by blists - more mailing lists

Please check out the Open Source Software Security Wiki, which is counterpart to this mailing list.

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.