// { dg-do run }
|
// { dg-do run }
|
// Test that binfos aren't erroneously shared between instantiations.
|
// Test that binfos aren't erroneously shared between instantiations.
|
|
|
class PK_CryptoSystem
|
class PK_CryptoSystem
|
{
|
{
|
};
|
};
|
class PK_Encryptor : public virtual PK_CryptoSystem
|
class PK_Encryptor : public virtual PK_CryptoSystem
|
{
|
{
|
};
|
};
|
class PK_FixedLengthCryptoSystem : public virtual PK_CryptoSystem
|
class PK_FixedLengthCryptoSystem : public virtual PK_CryptoSystem
|
{
|
{
|
public:
|
public:
|
virtual unsigned int CipherTextLength() const =0;
|
virtual unsigned int CipherTextLength() const =0;
|
};
|
};
|
class PK_FixedLengthEncryptor : public virtual PK_Encryptor, public virtual PK_FixedLengthCryptoSystem
|
class PK_FixedLengthEncryptor : public virtual PK_Encryptor, public virtual PK_FixedLengthCryptoSystem
|
{
|
{
|
};
|
};
|
class PK_SignatureSystem
|
class PK_SignatureSystem
|
{
|
{
|
public:
|
public:
|
virtual ~PK_SignatureSystem() {}
|
virtual ~PK_SignatureSystem() {}
|
};
|
};
|
class PK_Signer : public virtual PK_SignatureSystem
|
class PK_Signer : public virtual PK_SignatureSystem
|
{
|
{
|
public:
|
public:
|
virtual void Sign() = 0;
|
virtual void Sign() = 0;
|
};
|
};
|
class PK_Verifier : public virtual PK_SignatureSystem
|
class PK_Verifier : public virtual PK_SignatureSystem
|
{
|
{
|
};
|
};
|
class PK_Precomputation
|
class PK_Precomputation
|
{
|
{
|
};
|
};
|
template class
|
template class
|
PK_WithPrecomputation : public T, public virtual PK_Precomputation
|
PK_WithPrecomputation : public T, public virtual PK_Precomputation
|
{
|
{
|
};
|
};
|
typedef PK_WithPrecomputation PKWPFLE;
|
typedef PK_WithPrecomputation PKWPFLE;
|
typedef PK_WithPrecomputation PKWPS;
|
typedef PK_WithPrecomputation PKWPS;
|
template class
|
template class
|
ECPublicKey : public PKWPFLE
|
ECPublicKey : public PKWPFLE
|
{
|
{
|
public:
|
public:
|
unsigned int CipherTextLength() const { return 1; }
|
unsigned int CipherTextLength() const { return 1; }
|
EC ec;
|
EC ec;
|
};
|
};
|
template
|
template
|
class ECPrivateKey : public ECPublicKey, public PKWPS
|
class ECPrivateKey : public ECPublicKey, public PKWPS
|
{
|
{
|
void Sign() {}
|
void Sign() {}
|
int d;
|
int d;
|
};
|
};
|
template
|
template
|
class ECKEP : public ECPrivateKey
|
class ECKEP : public ECPrivateKey
|
{
|
{
|
};
|
};
|
class GF2NT : public PK_CryptoSystem
|
class GF2NT : public PK_CryptoSystem
|
{
|
{
|
int t1;
|
int t1;
|
};
|
};
|
class EC2N : public PK_CryptoSystem
|
class EC2N : public PK_CryptoSystem
|
{
|
{
|
GF2NT field;
|
GF2NT field;
|
int a;
|
int a;
|
};
|
};
|
template class ECKEP;
|
template class ECKEP;
|
template class ECKEP;
|
template class ECKEP;
|
|
|
int
|
int
|
main ()
|
main ()
|
{
|
{
|
ECKEP foo;
|
ECKEP foo;
|
|
|
return 0;
|
return 0;
|
}
|
}
|
|
|
|
|