-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsigner.hpp
More file actions
21 lines (17 loc) · 755 Bytes
/
Copy pathsigner.hpp
File metadata and controls
21 lines (17 loc) · 755 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Signer port, simulation adapter — the null signer.
//
// The simulation does not model identity: events/clock events go unsigned (empty
// signature) and verification always accepts, exactly matching pre-Stage-4
// behavior. Because the signature is excluded from the hash, this changes no hash
// and no statistic. Production swaps in a real Ed25519 signer (Stage 4).
#pragma once
#include "ports/signer.hpp"
namespace loti::sim {
struct NullSigner final : ports::Signer {
[[nodiscard]] domain::Signature sign(const domain::Bytes&) override { return {}; }
[[nodiscard]] bool verify(const domain::Bytes&, const domain::Signature&,
domain::NodeId) const override {
return true;
}
};
} // namespace loti::sim