Class ModuleSignatureVerifier

Assembly: redb.Tsak.Core.dll

Verifies a detached signature over a .tpkg package against a configured public key.

This is the trust anchor for module deployment: the signature is checked at the load
boundary (before any code from the package runs), so the public key — not "who wrote the
file" — decides what may execute. It covers both API uploads and files dropped into the module
directory, and uses only the BCL ( / ) — no external tool,
no cosign dependency.


Signing (in CI) is a SHA-256 signature over the raw .tpkg bytes with the matching private
key; the signature travels next to the package as {name}.tpkg.sig (base64 or raw bytes).
Both RSA (PKCS#1 v1.5) and ECDSA are accepted — the key type is inferred from the PEM.

public sealed class ModuleSignatureVerifier

Inheritance

Object→ModuleSignatureVerifier

Methods

FromKeyFile(string?)

Loads a verifier from a PEM public key file, or returns null when the path is unset —

public static ModuleSignatureVerifier? FromKeyFile(string? publicKeyPath)

Verify(byte[], byte[])

Verifies signature over packageBytes. Returns

public bool Verify(byte[] packageBytes, byte[] signature)

VerifyWithEncodedSignature(byte[], byte[])

Reads a signature that may be stored as base64 text or as raw signature bytes and verifies it.

public bool VerifyWithEncodedSignature(byte[] packageBytes, byte[] signatureFileBytes)

Constructors