/* * PK Operations * (C) 1999-2007 Jack Lloyd * * Distributed under the terms of the Botan license */ #include #if defined(BOTAN_HAS_IF_PUBLIC_KEY_FAMILY) #include #endif #if defined(BOTAN_HAS_DSA) #include #endif #if defined(BOTAN_HAS_NYBERG_RUEPPEL) #include #endif #if defined(BOTAN_HAS_ELGAMAL) #include #endif #if defined(BOTAN_HAS_DIFFIE_HELLMAN) #include #endif namespace Botan { #if defined(BOTAN_HAS_IF_PUBLIC_KEY_FAMILY) /* * Acquire an IF op */ IF_Operation* Default_Engine::if_op(const BigInt& e, const BigInt& n, const BigInt& d, const BigInt& p, const BigInt& q, const BigInt& d1, const BigInt& d2, const BigInt& c) const { return new Default_IF_Op(e, n, d, p, q, d1, d2, c); } #endif #if defined(BOTAN_HAS_DSA) /* * Acquire a DSA op */ DSA_Operation* Default_Engine::dsa_op(const DL_Group& group, const BigInt& y, const BigInt& x) const { return new Default_DSA_Op(group, y, x); } #endif #if defined(BOTAN_HAS_NYBERG_RUEPPEL) /* * Acquire a NR op */ NR_Operation* Default_Engine::nr_op(const DL_Group& group, const BigInt& y, const BigInt& x) const { return new Default_NR_Op(group, y, x); } #endif #if defined(BOTAN_HAS_ELGAMAL) /* * Acquire an ElGamal op */ ELG_Operation* Default_Engine::elg_op(const DL_Group& group, const BigInt& y, const BigInt& x) const { return new Default_ELG_Op(group, y, x); } #endif #if defined(BOTAN_HAS_DIFFIE_HELLMAN) /* * Acquire a DH op */ DH_Operation* Default_Engine::dh_op(const DL_Group& group, const BigInt& x) const { return new Default_DH_Op(group, x); } #endif }