Module authenticode

Source
Expand description

Windows Authenticode Portable Executable Signature Format

Authenticode is a digital signature format that is used to determine the origin and integrity of software binaries. Authenticode is based on Public-Key Cryptography Standards (PKCS) #7 signed data and X.509 certificates to bind an Authenticode-signed binary to the identity of a software publisher.

An Authenticode signature’s ContentInfo structure contains several structures that in turn contain the file’s hash value, page hash values (if present), the file description, and various optional or legacy ASN.1 fields.

Reference: Windows Authenticode Portable Executable Signature Format NOTE: the document differs from the actual implementation. This crate contains the structures used in actual signing.

Structs§

DigestInfo
The DigestInfo structure defines the digest algorithm and data
SpcAttributeTypeAndOptionalValue
The SpcAttributeTypeAndOptionalValue structure has two fields, which are set for an Authenticode-signed PE file. The attribute_type is set to SPC_PE_IMAGE_DATAOBJ OID (1.3.6.1.4.1.311.2.1.15)
SpcIndirectDataContent
The root structure is SpcIndirectDataContent.
SpcPeImageData
The SpcPeImageData structure specifies which portions of the Windows PE file are hashed.
SpcPeImageFlags
Flags specify which portions of the Windows PE file are hashed.
SpcSerializedObject
SpcSerializedObject contains a binary structure with page hashes
SpcSpOpusInfo
This structure is present in SignerInfo authenticated attributes. It is identified by SPC_SP_OPUS_INFO_OBJID (1.3.6.1.4.1.311.2.1.12)

Enums§

SpcLink
SPCLink originally contained information that describes the software publisher
SpcString
SpcString is either Unicode or ASCII string

Constants§

SPC_CAB_DATA_OBJID
SPC_CLASS_UUID
SPC_INDIRECT_DATA_OBJID
SPC_NESTED_SIGNATURE_OBJID
SPC_PE_IMAGE_DATA_OBJID
SPC_PE_IMAGE_PAGE_HASHES_V1
SPC_PE_IMAGE_PAGE_HASHES_V2
SPC_RFC3161_OBJID
SPC_SIPINFO_OBJID
SPC_SP_OPUS_INFO_OBJID
SPC_STATEMENT_TYPE_OBJID
SPC_TIME_STAMP_REQUEST_OBJID

Type Aliases§

SpcUuid