src/pqc_training_data/errors.py
536 B · 22 lines · python Raw
1 """Exception hierarchy."""
2
3
4 class TrainingDataError(Exception):
5 """Base for all training-data-transparency errors."""
6
7
8 class EmptyTreeError(TrainingDataError):
9 """Operation requires a non-empty Merkle tree."""
10
11
12 class InclusionProofError(TrainingDataError):
13 """Merkle inclusion proof failed to verify."""
14
15
16 class CommitmentVerificationError(TrainingDataError):
17 """ML-DSA signature on a commitment failed to verify."""
18
19
20 class IndexOutOfRangeError(TrainingDataError):
21 """Leaf index is out of range for the tree."""
22