mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-07-04 06:16:20 +12:00
Remove cryptoppwin submodule (#754)
Some checks failed
Android Build / x64 (release) (push) Has been cancelled
Android Build / arm64 (release) (push) Has been cancelled
HTTP Server Build / build (push) Has been cancelled
Hydra Core Build / Windows (push) Has been cancelled
Hydra Core Build / MacOS (push) Has been cancelled
Hydra Core Build / Linux (push) Has been cancelled
Hydra Core Build / Android-x64 (push) Has been cancelled
Hydra Core Build / ARM-Libretro (push) Has been cancelled
Linux AppImage Build / build (push) Has been cancelled
Linux Build / build (push) Has been cancelled
MacOS Build / MacOS-arm64 (push) Has been cancelled
MacOS Build / MacOS-x86_64 (push) Has been cancelled
MacOS Build / MacOS-Universal (push) Has been cancelled
Qt Build / Windows (push) Has been cancelled
Qt Build / MacOS-arm64 (push) Has been cancelled
Qt Build / MacOS-x86_64 (push) Has been cancelled
Qt Build / MacOS-Universal (push) Has been cancelled
Qt Build / Linux (push) Has been cancelled
Windows Build / build (push) Has been cancelled
iOS Simulator Build / build (push) Has been cancelled
Some checks failed
Android Build / x64 (release) (push) Has been cancelled
Android Build / arm64 (release) (push) Has been cancelled
HTTP Server Build / build (push) Has been cancelled
Hydra Core Build / Windows (push) Has been cancelled
Hydra Core Build / MacOS (push) Has been cancelled
Hydra Core Build / Linux (push) Has been cancelled
Hydra Core Build / Android-x64 (push) Has been cancelled
Hydra Core Build / ARM-Libretro (push) Has been cancelled
Linux AppImage Build / build (push) Has been cancelled
Linux Build / build (push) Has been cancelled
MacOS Build / MacOS-arm64 (push) Has been cancelled
MacOS Build / MacOS-x86_64 (push) Has been cancelled
MacOS Build / MacOS-Universal (push) Has been cancelled
Qt Build / Windows (push) Has been cancelled
Qt Build / MacOS-arm64 (push) Has been cancelled
Qt Build / MacOS-x86_64 (push) Has been cancelled
Qt Build / MacOS-Universal (push) Has been cancelled
Qt Build / Linux (push) Has been cancelled
Windows Build / build (push) Has been cancelled
iOS Simulator Build / build (push) Has been cancelled
This commit is contained in:
parent
5591606177
commit
6182d4cfe9
198 changed files with 51291 additions and 4 deletions
70
third_party/cryptoppwin/include/cryptopp/blumshub.h
vendored
Normal file
70
third_party/cryptoppwin/include/cryptopp/blumshub.h
vendored
Normal file
|
@ -0,0 +1,70 @@
|
|||
// blumshub.h - originally written and placed in the public domain by Wei Dai
|
||||
|
||||
/// \file blumshub.h
|
||||
/// \brief Classes for Blum Blum Shub generator
|
||||
|
||||
#ifndef CRYPTOPP_BLUMSHUB_H
|
||||
#define CRYPTOPP_BLUMSHUB_H
|
||||
|
||||
#include "cryptlib.h"
|
||||
#include "modarith.h"
|
||||
#include "integer.h"
|
||||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
/// \brief BlumBlumShub without factorization of the modulus
|
||||
/// \details You should reseed the generator after a fork() to avoid multiple generators
|
||||
/// with the same internal state.
|
||||
class PublicBlumBlumShub : public RandomNumberGenerator,
|
||||
public StreamTransformation
|
||||
{
|
||||
public:
|
||||
virtual ~PublicBlumBlumShub() {}
|
||||
|
||||
/// \brief Construct a PublicBlumBlumShub
|
||||
/// \param n the modulus
|
||||
/// \param seed the seed for the generator
|
||||
/// \details seed is the secret key and should be about as large as n.
|
||||
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;
|
||||
Integer current;
|
||||
word maxBits, bitsLeft;
|
||||
};
|
||||
|
||||
/// \brief BlumBlumShub with factorization of the modulus
|
||||
/// \details You should reseed the generator after a fork() to avoid multiple generators
|
||||
/// with the same internal state.
|
||||
class BlumBlumShub : public PublicBlumBlumShub
|
||||
{
|
||||
public:
|
||||
virtual ~BlumBlumShub() {}
|
||||
|
||||
/// \brief Construct a BlumBlumShub
|
||||
/// \param p the first prime factor
|
||||
/// \param q the second prime factor
|
||||
/// \param seed the seed for the generator
|
||||
/// \details Esure 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 large 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
|
Loading…
Add table
Add a link
Reference in a new issue