mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-07-03 22:06: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
55
third_party/cryptoppwin/include/cryptopp/xtrcrypt.h
vendored
Normal file
55
third_party/cryptoppwin/include/cryptopp/xtrcrypt.h
vendored
Normal file
|
@ -0,0 +1,55 @@
|
|||
#ifndef CRYPTOPP_XTRCRYPT_H
|
||||
#define CRYPTOPP_XTRCRYPT_H
|
||||
|
||||
/// \file
|
||||
/// \brief XTR public key system
|
||||
/// \sa "The XTR public key system" by Arjen K. Lenstra and Eric R. Verheul
|
||||
|
||||
#include "cryptlib.h"
|
||||
#include "xtr.h"
|
||||
#include "integer.h"
|
||||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
/// \brief XTR-DH with key validation
|
||||
class XTR_DH : public SimpleKeyAgreementDomain, public CryptoParameters
|
||||
{
|
||||
typedef XTR_DH ThisClass;
|
||||
|
||||
public:
|
||||
XTR_DH(const Integer &p, const Integer &q, const GFP2Element &g);
|
||||
XTR_DH(RandomNumberGenerator &rng, unsigned int pbits, unsigned int qbits);
|
||||
XTR_DH(BufferedTransformation &domainParams);
|
||||
|
||||
void DEREncode(BufferedTransformation &domainParams) const;
|
||||
|
||||
bool Validate(RandomNumberGenerator &rng, unsigned int level) const;
|
||||
bool GetVoidValue(const char *name, const std::type_info &valueType, void *pValue) const;
|
||||
void AssignFrom(const NameValuePairs &source);
|
||||
CryptoParameters & AccessCryptoParameters() {return *this;}
|
||||
unsigned int AgreedValueLength() const {return 2*m_p.ByteCount();}
|
||||
unsigned int PrivateKeyLength() const {return m_q.ByteCount();}
|
||||
unsigned int PublicKeyLength() const {return 2*m_p.ByteCount();}
|
||||
|
||||
void GeneratePrivateKey(RandomNumberGenerator &rng, byte *privateKey) const;
|
||||
void GeneratePublicKey(RandomNumberGenerator &rng, const byte *privateKey, byte *publicKey) const;
|
||||
bool Agree(byte *agreedValue, const byte *privateKey, const byte *otherPublicKey, bool validateOtherPublicKey=true) const;
|
||||
|
||||
const Integer &GetModulus() const {return m_p;}
|
||||
const Integer &GetSubgroupOrder() const {return m_q;}
|
||||
const GFP2Element &GetSubgroupGenerator() const {return m_g;}
|
||||
|
||||
void SetModulus(const Integer &p) {m_p = p;}
|
||||
void SetSubgroupOrder(const Integer &q) {m_q = q;}
|
||||
void SetSubgroupGenerator(const GFP2Element &g) {m_g = g;}
|
||||
|
||||
private:
|
||||
unsigned int ExponentBitLength() const;
|
||||
|
||||
Integer m_p, m_q;
|
||||
GFP2Element m_g;
|
||||
};
|
||||
|
||||
NAMESPACE_END
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue