using StellaOps.Replay.Core;
namespace StellaOps.Scanner.ProofSpine;
///
/// Service for DSSE (Dead Simple Signing Envelope) signing operations.
///
public interface IDsseSigningService
{
///
/// Signs a payload and returns a DSSE envelope.
///
Task SignAsync(
object payload,
string payloadType,
ICryptoProfile cryptoProfile,
CancellationToken cancellationToken = default);
///
/// Verifies a DSSE envelope signature.
///
Task VerifyAsync(
DsseEnvelope envelope,
CancellationToken cancellationToken = default);
}
///
/// Cryptographic profile for signing operations.
///
public interface ICryptoProfile
{
///
/// Key identifier.
///
string KeyId { get; }
///
/// Signing algorithm identifier (e.g., "hs256", "ed25519").
///
string Algorithm { get; }
}
public sealed record DsseVerificationOutcome(
bool IsValid,
bool IsTrusted,
string? FailureReason);