Table of Contents

Class CryptoVerifier

Namespace
SimpleSign.Core.Validation
Assembly
SimpleSign.Core.dll

Verifies cryptographic signature validity and PAdES attribute binding. All methods are static — no state needed. Uses Span<byte> to minimize allocations.

public static class CryptoVerifier
Inheritance
CryptoVerifier
Inherited Members

Methods

ValidateSigningCertV2(CmsSignedData, List<string>, ILogger?)

Validates signingCertificate (V1/V2) binding (certificate ↔ signature anti-substitution). Respects the hash algorithm declared in the attribute (SHA-1 for V1, SHA-256 default for V2).

public static void ValidateSigningCertV2(CmsSignedData cmsData, List<string> errors, ILogger? logger = null)

Parameters

cmsData CmsSignedData
errors List<string>
logger ILogger

VerifySignature(CmsSignedData, ILogger?)

Verifies the RSA/ECDSA signature over the signed attributes. SignedAttrs must already have SET OF tag (0x31) — normalized by CmsParser.

public static bool VerifySignature(CmsSignedData cmsData, ILogger? logger = null)

Parameters

cmsData CmsSignedData
logger ILogger

Returns

bool