1#![allow(non_camel_case_types, non_snake_case)]
2
3#[derive(Debug, Clone, Copy, PartialEq, Eq)]
4pub enum Error {
5 InvalidInputError,
6 DeriveKeyPairError,
7 CurveError,
8 HashToCurveError,
9 ElgamalError,
10 RandomnessError,
11}
12
13impl From<p256::Error> for Error {
14 fn from(_: p256::Error) -> Self {
15 Self::CurveError
16 }
17}
18
19impl From<hash_to_curve::Error> for Error {
20 fn from(_: hash_to_curve::Error) -> Self {
21 Self::HashToCurveError
22 }
23}
24
25impl From<elgamal::Error> for Error {
26 fn from(_: elgamal::Error) -> Self {
27 Self::ElgamalError
28 }
29}
30
31impl From<hacspec_lib::Error> for Error {
32 fn from(_value: hacspec_lib::Error) -> Self {
33 Self::RandomnessError
34 }
35}
36
37pub mod protocol;
39
40pub mod p256_sha256;
42
43pub mod coprf;