diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2013-03-23 21:53:08 +0100 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2013-03-23 21:53:08 +0100 |
commit | 561f10539494ce6cba62d58dab2a6686e04c760b (patch) | |
tree | f9d4cb50653ffa7473bdf148b900145aff8e4074 /CryptoPP/blumshub.h | |
parent | MemDumpAnalysis now outputs executable to MCServer folder and debugging starts there. (diff) | |
download | cuberite-561f10539494ce6cba62d58dab2a6686e04c760b.tar cuberite-561f10539494ce6cba62d58dab2a6686e04c760b.tar.gz cuberite-561f10539494ce6cba62d58dab2a6686e04c760b.tar.bz2 cuberite-561f10539494ce6cba62d58dab2a6686e04c760b.tar.lz cuberite-561f10539494ce6cba62d58dab2a6686e04c760b.tar.xz cuberite-561f10539494ce6cba62d58dab2a6686e04c760b.tar.zst cuberite-561f10539494ce6cba62d58dab2a6686e04c760b.zip |
Diffstat (limited to 'CryptoPP/blumshub.h')
-rw-r--r-- | CryptoPP/blumshub.h | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/CryptoPP/blumshub.h b/CryptoPP/blumshub.h deleted file mode 100644 index 5e5074786..000000000 --- a/CryptoPP/blumshub.h +++ /dev/null @@ -1,53 +0,0 @@ -#ifndef CRYPTOPP_BLUMSHUB_H -#define CRYPTOPP_BLUMSHUB_H - -#include "modarith.h" - -NAMESPACE_BEGIN(CryptoPP) - -class BlumGoldwasserPublicKey; -class BlumGoldwasserPrivateKey; - -//! BlumBlumShub without factorization of the modulus -class PublicBlumBlumShub : public RandomNumberGenerator, - public StreamTransformation -{ -public: - PublicBlumBlumShub(const Integer &n, const Integer &seed); - - unsigned int GenerateBit(); - byte GenerateByte(); - void GenerateBlock(byte *output, size_t size); - void ProcessData(byte *outString, const byte *inString, size_t length); - - bool IsSelfInverting() const {return true;} - bool IsForwardTransformation() const {return true;} - -protected: - ModularArithmetic modn; - word maxBits, bitsLeft; - Integer current; - - friend class BlumGoldwasserPublicKey; - friend class BlumGoldwasserPrivateKey; -}; - -//! BlumBlumShub with factorization of the modulus -class BlumBlumShub : public PublicBlumBlumShub -{ -public: - // Make sure p and q are both primes congruent to 3 mod 4 and at least 512 bits long, - // seed is the secret key and should be about as big as p*q - BlumBlumShub(const Integer &p, const Integer &q, const Integer &seed); - - bool IsRandomAccess() const {return true;} - void Seek(lword index); - -protected: - const Integer p, q; - const Integer x0; -}; - -NAMESPACE_END - -#endif |