7 #ifndef CRYPTOPP_PSSR_H 8 #define CRYPTOPP_PSSR_H 14 #ifdef CRYPTOPP_IS_DLL 22 virtual bool AllowRecovery()
const =0;
23 virtual size_t SaltLen(
size_t hashLen)
const =0;
24 virtual size_t MinPadLen(
size_t hashLen)
const =0;
28 size_t MinRepresentativeBitLength(
size_t hashIdentifierLength,
size_t digestLength)
const;
29 size_t MaxRecoverableLength(
size_t representativeBitLength,
size_t hashIdentifierLength,
size_t digestLength)
const;
30 bool IsProbabilistic()
const;
31 bool AllowNonrecoverablePart()
const;
32 bool RecoverablePartFirst()
const;
34 const byte *recoverableMessage,
size_t recoverableMessageLength,
36 byte *representative,
size_t representativeBitLength)
const;
39 byte *representative,
size_t representativeBitLength,
40 byte *recoverableMessage)
const;
47 template <
bool ALLOW_RECOVERY,
class MGF=
P1363_MGF1,
int SALT_LEN=-1,
int MIN_PAD_LEN=0,
bool USE_HASH_ID=
false>
50 virtual bool AllowRecovery()
const {
return ALLOW_RECOVERY;}
51 virtual size_t SaltLen(
size_t hashLen)
const {
return SALT_LEN < 0 ? hashLen : SALT_LEN;}
52 virtual size_t MinPadLen(
size_t hashLen)
const {
return MIN_PAD_LEN < 0 ? hashLen : MIN_PAD_LEN;}
56 static std::string CRYPTOPP_API StaticAlgorithmName() {
return std::string(ALLOW_RECOVERY ?
"PSSR-" :
"PSS-") + MGF::StaticAlgorithmName();}
Classes and functions for various padding schemes used in public key algorithms.
This file contains helper classes/functions for implementing public key algorithms.
Abstract base classes that provide a uniform interface to this library.
Interface for random number generators.
Base class for public key signature standard classes.
Returns a decoding results.
Classes for SHA-1 and SHA-2 family of message digests.
Crypto++ library namespace.
Interface for message encoding method for public key signature schemes.