26 : m_channelsReady(0), m_channelsFinished(0), m_threshold (0)
29 unsigned int GetThreshold()
const {
return m_threshold;}
30 void AddOutputChannel(
word32 channelId);
31 void ChannelData(
word32 channelId,
const byte *inString,
size_t length,
bool messageEnd);
35 size_t ChannelPut2(
const std::string &channel,
const byte *begin,
size_t length,
int messageEnd,
bool blocking)
39 ChannelData(StringToWord<word32>(channel), begin, length, messageEnd != 0);
44 virtual void FlushOutputQueues();
45 virtual void OutputMessageEnds();
47 unsigned int InsertInputChannel(
word32 channelId);
48 unsigned int LookupInputChannel(
word32 channelId)
const;
49 void ComputeV(
unsigned int);
50 void PrepareInterpolation();
51 void ProcessInputQueues();
53 typedef std::map<word32, unsigned int> InputChannelMap;
54 InputChannelMap m_inputChannelMap;
55 InputChannelMap::iterator m_lastMapPosition;
56 std::vector<MessageQueue> m_inputQueues;
57 std::vector<word32> m_inputChannelIds, m_outputChannelIds, m_outputToInput;
58 std::vector<std::string> m_outputChannelIdStrings;
59 std::vector<ByteQueue> m_outputQueues;
60 std::vector<SecBlock<word32> > m_v;
63 unsigned int m_channelsReady, m_channelsFinished;
83 size_t Put2(
const byte *begin,
size_t length,
int messageEnd,
bool blocking);
84 bool Flush(
bool hardFlush,
int propagation=-1,
bool blocking=
true) {
return m_ida.
Flush(hardFlush, propagation, blocking);}
107 void FlushOutputQueues();
108 void OutputMessageEnds();
124 : m_ida(new
OutputProxy(*this, true)), m_pad(false), m_nextChannel(0)
131 size_t Put2(
const byte *begin,
size_t length,
int messageEnd,
bool blocking);
132 bool Flush(
bool hardFlush,
int propagation=-1,
bool blocking=
true) {
return m_ida.
Flush(hardFlush, propagation, blocking);}
137 unsigned int m_nextChannel;
149 :
RawIDA(attachment), m_pad(false)
155 void FlushOutputQueues();
156 void OutputMessageEnds();
166 : m_possiblePadding(
false), m_zeroCount(0) {
Detach(attachment);}
169 {CRYPTOPP_UNUSED(parameters); m_possiblePadding =
false;}
170 size_t Put2(
const byte *begin,
size_t length,
int messageEnd,
bool blocking);
173 bool GetPossiblePadding()
const {
return m_possiblePadding;}
176 bool m_possiblePadding;
AlgorithmParameters MakeParameters(const char *name, const T &value, bool throwIfNotUsed=true)
Create an object that implements NameValuePairs.
Classes for multiple named channels.
Provides auto signaling support.
Data structure used to store byte strings.
Interface for custom flush signals propagation.
Implementation of BufferedTransformation's attachment interface.
void Detach(BufferedTransformation *newAttachment=NULL)
Replace an attached transformation.
GF(2^32) with polynomial basis.
Multiple channels support for custom signal processing.
Interface for retrieving values given their names.
Filter class that is a proxy for a sink.
void IsolatedInitialize(const NameValuePairs ¶meters)
Initialize or reinitialize this object, without signal propagation.
size_t Put2(const byte *begin, size_t length, int messageEnd, bool blocking)
Input multiple bytes for processing.
Interface for random number generators.
Secret sharing and information dispersal base class.
size_t ChannelPut2(const std::string &channel, const byte *begin, size_t length, int messageEnd, bool blocking)
Input multiple bytes for processing on a channel.
Shamir's Secret Sharing Algorithm.
SecretRecovery(int threshold, BufferedTransformation *attachment=NULL, bool removePadding=true)
Construct a SecretRecovery.
void IsolatedInitialize(const NameValuePairs ¶meters=g_nullNameValuePairs)
Initialize or reinitialize this object, without signal propagation.
Shamir's Secret Sharing Algorithm.
SecretSharing(RandomNumberGenerator &rng, int threshold, int nShares, BufferedTransformation *attachment=NULL, bool addPadding=true)
Construct a SecretSharing.
size_t Put2(const byte *begin, size_t length, int messageEnd, bool blocking)
Input multiple bytes for processing.
bool Flush(bool hardFlush, int propagation=-1, bool blocking=true)
Flush buffered input and/or output, with signal propagation.
void IsolatedInitialize(const NameValuePairs ¶meters=g_nullNameValuePairs)
Initialize or reinitialize this object, without signal propagation.
Base class for unflushable filters.
bool Flush(bool completeFlush, int propagation=-1, bool blocking=true)
Flush buffered input and/or output, with signal propagation.
unsigned int word32
32-bit unsigned datatype
word64 lword
Large word type.
Abstract base classes that provide a uniform interface to this library.
const NameValuePairs & g_nullNameValuePairs
An empty set of name-value pairs.
Implementation of BufferedTransformation's attachment interface.
Classes and functions for schemes over GF(2^32)
Utility functions for the Crypto++ library.
Classes for an unlimited queue to store messages.
Crypto++ library namespace.
Classes and functions for secure memory allocations.