mirror of
https://github.com/shadps4-emu/ext-cryptopp.git
synced 2025-01-18 23:34:06 +00:00
Rename ECGDSA_ISO15946 -> ECGDSA (#634)
This commit is contained in:
parent
04c990e5c7
commit
9888d22d4b
@ -747,7 +747,7 @@ void DL_PrivateKey_EC<EC>::DEREncodePrivateKey(BufferedTransformation &bt) const
|
||||
// ******************************************************************
|
||||
|
||||
template <class EC>
|
||||
void DL_PublicKey_ECGDSA_ISO15946<EC>::BERDecodePublicKey(BufferedTransformation &bt, bool parametersPresent, size_t size)
|
||||
void DL_PublicKey_ECGDSA<EC>::BERDecodePublicKey(BufferedTransformation &bt, bool parametersPresent, size_t size)
|
||||
{
|
||||
CRYPTOPP_UNUSED(parametersPresent);
|
||||
|
||||
@ -758,7 +758,7 @@ void DL_PublicKey_ECGDSA_ISO15946<EC>::BERDecodePublicKey(BufferedTransformation
|
||||
}
|
||||
|
||||
template <class EC>
|
||||
void DL_PublicKey_ECGDSA_ISO15946<EC>::DEREncodePublicKey(BufferedTransformation &bt) const
|
||||
void DL_PublicKey_ECGDSA<EC>::DEREncodePublicKey(BufferedTransformation &bt) const
|
||||
{
|
||||
this->GetGroupParameters().GetCurve().EncodePoint(bt, this->GetPublicElement(), this->GetGroupParameters().GetPointCompression());
|
||||
}
|
||||
@ -766,7 +766,7 @@ void DL_PublicKey_ECGDSA_ISO15946<EC>::DEREncodePublicKey(BufferedTransformation
|
||||
// ******************************************************************
|
||||
|
||||
template <class EC>
|
||||
void DL_PrivateKey_ECGDSA_ISO15946<EC>::BERDecodePrivateKey(BufferedTransformation &bt, bool parametersPresent, size_t size)
|
||||
void DL_PrivateKey_ECGDSA<EC>::BERDecodePrivateKey(BufferedTransformation &bt, bool parametersPresent, size_t size)
|
||||
{
|
||||
CRYPTOPP_UNUSED(size);
|
||||
BERSequenceDecoder seq(bt);
|
||||
@ -805,7 +805,7 @@ void DL_PrivateKey_ECGDSA_ISO15946<EC>::BERDecodePrivateKey(BufferedTransformati
|
||||
}
|
||||
|
||||
template <class EC>
|
||||
void DL_PrivateKey_ECGDSA_ISO15946<EC>::DEREncodePrivateKey(BufferedTransformation &bt) const
|
||||
void DL_PrivateKey_ECGDSA<EC>::DEREncodePrivateKey(BufferedTransformation &bt) const
|
||||
{
|
||||
DERSequenceEncoder privateKey(bt);
|
||||
DEREncodeUnsigned<word32>(privateKey, 1); // version
|
||||
|
54
eccrypto.h
54
eccrypto.h
@ -402,21 +402,21 @@ struct ECNR : public DL_SS<DL_Keys_EC<EC>, DL_Algorithm_ECNR<EC>, DL_SignatureMe
|
||||
// ******************************************
|
||||
|
||||
template <class EC>
|
||||
class DL_PublicKey_ECGDSA_ISO15946;
|
||||
class DL_PublicKey_ECGDSA;
|
||||
template <class EC>
|
||||
class DL_PrivateKey_ECGDSA_ISO15946;
|
||||
class DL_PrivateKey_ECGDSA;
|
||||
|
||||
/// \brief Elliptic Curve German DSA key for ISO/IEC 15946
|
||||
/// \tparam EC elliptic curve field
|
||||
/// \sa ECGDSA_ISO15946
|
||||
/// \sa ECGDSA
|
||||
/// \since Crypto++ 6.0
|
||||
template <class EC>
|
||||
class DL_PrivateKey_ECGDSA_ISO15946 : public DL_PrivateKeyImpl<DL_GroupParameters_EC<EC> >
|
||||
class DL_PrivateKey_ECGDSA : public DL_PrivateKeyImpl<DL_GroupParameters_EC<EC> >
|
||||
{
|
||||
public:
|
||||
typedef typename EC::Point Element;
|
||||
|
||||
virtual ~DL_PrivateKey_ECGDSA_ISO15946() {}
|
||||
virtual ~DL_PrivateKey_ECGDSA() {}
|
||||
|
||||
/// \brief Initialize an EC Private Key using {GP,x}
|
||||
/// \param params group parameters
|
||||
@ -462,7 +462,7 @@ public:
|
||||
void Initialize(RandomNumberGenerator &rng, const EC &ec, const Element &G, const Integer &n)
|
||||
{this->GenerateRandom(rng, DL_GroupParameters_EC<EC>(ec, G, n));}
|
||||
|
||||
virtual void MakePublicKey(DL_PublicKey_ECGDSA_ISO15946<EC> &pub) const
|
||||
virtual void MakePublicKey(DL_PublicKey_ECGDSA<EC> &pub) const
|
||||
{
|
||||
const DL_GroupParameters<Element>& params = this->GetAbstractGroupParameters();
|
||||
pub.AccessAbstractGroupParameters().AssignFrom(params);
|
||||
@ -473,14 +473,14 @@ public:
|
||||
|
||||
virtual bool GetVoidValue(const char *name, const std::type_info &valueType, void *pValue) const
|
||||
{
|
||||
return GetValueHelper<DL_PrivateKey_ECGDSA_ISO15946<EC>,
|
||||
DL_PrivateKey_ECGDSA_ISO15946<EC> >(this, name, valueType, pValue).Assignable();
|
||||
return GetValueHelper<DL_PrivateKey_ECGDSA<EC>,
|
||||
DL_PrivateKey_ECGDSA<EC> >(this, name, valueType, pValue).Assignable();
|
||||
}
|
||||
|
||||
virtual void AssignFrom(const NameValuePairs &source)
|
||||
{
|
||||
AssignFromHelper<DL_PrivateKey_ECGDSA_ISO15946<EC>,
|
||||
DL_PrivateKey_ECGDSA_ISO15946<EC> >(this, source);
|
||||
AssignFromHelper<DL_PrivateKey_ECGDSA<EC>,
|
||||
DL_PrivateKey_ECGDSA<EC> >(this, source);
|
||||
}
|
||||
|
||||
// PKCS8PrivateKey
|
||||
@ -490,17 +490,17 @@ public:
|
||||
|
||||
/// \brief Elliptic Curve German DSA key for ISO/IEC 15946
|
||||
/// \tparam EC elliptic curve field
|
||||
/// \sa ECGDSA_ISO15946
|
||||
/// \sa ECGDSA
|
||||
/// \since Crypto++ 6.0
|
||||
template <class EC>
|
||||
class DL_PublicKey_ECGDSA_ISO15946 : public DL_PublicKeyImpl<DL_GroupParameters_EC<EC> >
|
||||
class DL_PublicKey_ECGDSA : public DL_PublicKeyImpl<DL_GroupParameters_EC<EC> >
|
||||
{
|
||||
typedef DL_PublicKey_ECGDSA_ISO15946<EC> ThisClass;
|
||||
typedef DL_PublicKey_ECGDSA<EC> ThisClass;
|
||||
|
||||
public:
|
||||
typedef typename EC::Point Element;
|
||||
|
||||
virtual ~DL_PublicKey_ECGDSA_ISO15946() {}
|
||||
virtual ~DL_PublicKey_ECGDSA() {}
|
||||
|
||||
/// \brief Initialize an EC Public Key using {GP,Q}
|
||||
/// \param params group parameters
|
||||
@ -520,7 +520,7 @@ public:
|
||||
|
||||
virtual void AssignFrom(const NameValuePairs &source)
|
||||
{
|
||||
DL_PrivateKey_ECGDSA_ISO15946<EC> *pPrivateKey = NULLPTR;
|
||||
DL_PrivateKey_ECGDSA<EC> *pPrivateKey = NULLPTR;
|
||||
if (source.GetThisPointer(pPrivateKey))
|
||||
pPrivateKey->MakePublicKey(*this);
|
||||
else
|
||||
@ -542,21 +542,21 @@ public:
|
||||
|
||||
/// \brief Elliptic Curve German DSA keys for ISO/IEC 15946
|
||||
/// \tparam EC elliptic curve field
|
||||
/// \sa ECGDSA_ISO15946
|
||||
/// \sa ECGDSA
|
||||
/// \since Crypto++ 6.0
|
||||
template <class EC>
|
||||
struct DL_Keys_ECGDSA_ISO15946
|
||||
struct DL_Keys_ECGDSA
|
||||
{
|
||||
typedef DL_PublicKey_ECGDSA_ISO15946<EC> PublicKey;
|
||||
typedef DL_PrivateKey_ECGDSA_ISO15946<EC> PrivateKey;
|
||||
typedef DL_PublicKey_ECGDSA<EC> PublicKey;
|
||||
typedef DL_PrivateKey_ECGDSA<EC> PrivateKey;
|
||||
};
|
||||
|
||||
/// \brief Elliptic Curve German DSA signature algorithm
|
||||
/// \tparam EC elliptic curve field
|
||||
/// \sa ECGDSA_ISO15946
|
||||
/// \sa ECGDSA
|
||||
/// \since Crypto++ 6.0
|
||||
template <class EC>
|
||||
class DL_Algorithm_ECGDSA_ISO15946 : public DL_Algorithm_GDSA_ISO15946<typename EC::Point>
|
||||
class DL_Algorithm_ECGDSA : public DL_Algorithm_GDSA_ISO15946<typename EC::Point>
|
||||
{
|
||||
public:
|
||||
CRYPTOPP_STATIC_CONSTEXPR const char* CRYPTOPP_API StaticAlgorithmName() {return "ECGDSA";}
|
||||
@ -571,8 +571,8 @@ public:
|
||||
/// \since Crypto++ 6.0
|
||||
template <class EC, class H>
|
||||
struct ECGDSA : public DL_SS<
|
||||
DL_Keys_ECGDSA_ISO15946<EC>,
|
||||
DL_Algorithm_ECGDSA_ISO15946<EC>,
|
||||
DL_Keys_ECGDSA<EC>,
|
||||
DL_Algorithm_ECGDSA<EC>,
|
||||
DL_SignatureMessageEncodingMethod_DSA,
|
||||
H>
|
||||
{
|
||||
@ -641,14 +641,14 @@ CRYPTOPP_DLL_TEMPLATE_CLASS DL_PublicKeyImpl<DL_GroupParameters_EC<ECP> >;
|
||||
CRYPTOPP_DLL_TEMPLATE_CLASS DL_PublicKeyImpl<DL_GroupParameters_EC<EC2N> >;
|
||||
CRYPTOPP_DLL_TEMPLATE_CLASS DL_PublicKey_EC<ECP>;
|
||||
CRYPTOPP_DLL_TEMPLATE_CLASS DL_PublicKey_EC<EC2N>;
|
||||
CRYPTOPP_DLL_TEMPLATE_CLASS DL_PublicKey_ECGDSA_ISO15946<ECP>;
|
||||
CRYPTOPP_DLL_TEMPLATE_CLASS DL_PublicKey_ECGDSA_ISO15946<EC2N>;
|
||||
CRYPTOPP_DLL_TEMPLATE_CLASS DL_PublicKey_ECGDSA<ECP>;
|
||||
CRYPTOPP_DLL_TEMPLATE_CLASS DL_PublicKey_ECGDSA<EC2N>;
|
||||
CRYPTOPP_DLL_TEMPLATE_CLASS DL_PrivateKeyImpl<DL_GroupParameters_EC<ECP> >;
|
||||
CRYPTOPP_DLL_TEMPLATE_CLASS DL_PrivateKeyImpl<DL_GroupParameters_EC<EC2N> >;
|
||||
CRYPTOPP_DLL_TEMPLATE_CLASS DL_PrivateKey_EC<ECP>;
|
||||
CRYPTOPP_DLL_TEMPLATE_CLASS DL_PrivateKey_EC<EC2N>;
|
||||
CRYPTOPP_DLL_TEMPLATE_CLASS DL_PrivateKey_ECGDSA_ISO15946<ECP>;
|
||||
CRYPTOPP_DLL_TEMPLATE_CLASS DL_PrivateKey_ECGDSA_ISO15946<EC2N>;
|
||||
CRYPTOPP_DLL_TEMPLATE_CLASS DL_PrivateKey_ECGDSA<ECP>;
|
||||
CRYPTOPP_DLL_TEMPLATE_CLASS DL_PrivateKey_ECGDSA<EC2N>;
|
||||
CRYPTOPP_DLL_TEMPLATE_CLASS DL_Algorithm_GDSA<ECP::Point>;
|
||||
CRYPTOPP_DLL_TEMPLATE_CLASS DL_Algorithm_GDSA<EC2N::Point>;
|
||||
CRYPTOPP_DLL_TEMPLATE_CLASS DL_PrivateKey_WithSignaturePairwiseConsistencyTest<DL_PrivateKey_EC<ECP>, ECDSA<ECP, SHA256> >;
|
||||
|
Loading…
x
Reference in New Issue
Block a user