1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Copyright 2023 Marvin Beckmann
//
// This file is part of qFALL-schemes.
//
// qfall-schemes is free software: you can redistribute it and/or modify it under
// the terms of the Mozilla Public License Version 2.0 as published by the
// Mozilla Foundation. See <https://mozilla.org/en-US/MPL/2.0/>.
//! Contains implementations of the (stateful) full domain hash signature scheme.
//!
//! The constructions follow the general definition of a hash-then-sign signature scheme
//! that uses a hash function as in [\[1\]](<../index.html#:~:text=[1]>) and a PSF.
//! This signature scheme uses a storage, so it is stateful.
//!
//! Requirements
//! - `psf`: The PSF which has to implement the [`PSF`](qfall_tools::primitive::psf::PSF) trait
//! and must also be (de-)serializable.
//! - `storage`: A Hashmap that safes all previously signed messages and their signature
//! - `hash`: The hash-function which has to map a string into the correct domain
//!
//! # Example
//! ## Signature Scheme from [`PSFGPV`](qfall_tools::primitive::psf::PSFGPV)
//! ```
//! use qfall_schemes::signature::{fdh::FDHGPV, SignatureScheme};
//!
//! let mut fdh = FDHGPV::setup(4, 113, 17);
//!
//! let m = "Hello World!";
//!
//! let (pk, sk) = fdh.key_gen();
//! let sigma = fdh.sign(m.to_owned(), &sk, &pk);
//!
//! assert!(fdh.vfy(m.to_owned(), &sigma, &pk));
//! ```
pub use FDHGPV;
pub use FDHGPVRing;