diff options
author | Keith Isdale <keith.isdale@nokia.com> | 2010-07-26 14:56:53 +1000 |
---|---|---|
committer | Keith Isdale <keith.isdale@nokia.com> | 2010-07-26 14:56:53 +1000 |
commit | 9f034793bcfc51c2b7c1dd14db806f7258f9a9eb (patch) | |
tree | 63bd0f50ce5b77828ad8205eafd7b9412810499e /botan/src/engine/def_engine/def_pk_ops.cpp | |
parent | 619d92cfef29e653bfdf852e83888e50cfc4348f (diff) | |
parent | 65271649dbc90f3af1184ad1b23bdb64c0c07d07 (diff) |
Merge branch 'master' of git://git-nokia.trolltech.com.au/qtsoftware/research/qtuitest
Diffstat (limited to 'botan/src/engine/def_engine/def_pk_ops.cpp')
-rw-r--r-- | botan/src/engine/def_engine/def_pk_ops.cpp | 121 |
1 files changed, 121 insertions, 0 deletions
diff --git a/botan/src/engine/def_engine/def_pk_ops.cpp b/botan/src/engine/def_engine/def_pk_ops.cpp new file mode 100644 index 0000000..31dce7a --- /dev/null +++ b/botan/src/engine/def_engine/def_pk_ops.cpp @@ -0,0 +1,121 @@ +/* +* PK Operations +* (C) 1999-2007 Jack Lloyd +* +* Distributed under the terms of the Botan license +*/ + +#include <botan/def_eng.h> + +#if defined(BOTAN_HAS_IF_PUBLIC_KEY_FAMILY) + #include <botan/if_op.h> +#endif + +#if defined(BOTAN_HAS_DSA) + #include <botan/dsa_op.h> +#endif + +#if defined(BOTAN_HAS_NYBERG_RUEPPEL) + #include <botan/nr_op.h> +#endif + +#if defined(BOTAN_HAS_ELGAMAL) + #include <botan/elg_op.h> +#endif + +#if defined(BOTAN_HAS_DIFFIE_HELLMAN) + #include <botan/dh_op.h> +#endif + +#if defined(BOTAN_HAS_ECDSA) + #include <botan/ecdsa_op.h> +#endif + +#if defined(BOTAN_HAS_ECKAEG) + #include <botan/eckaeg_op.h> +#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 + +#if defined(BOTAN_HAS_ECDSA) +/* +* Acquire a ECDSA op +*/ +ECDSA_Operation* Default_Engine::ecdsa_op(const EC_Domain_Params& dom_pars, + const BigInt& priv_key, + const PointGFp& pub_key) const + { + return new Default_ECDSA_Op(dom_pars, priv_key, pub_key); + } +#endif + +#if defined(BOTAN_HAS_ECKAEG) +/* +* Acquire a ECKAEG op +*/ +ECKAEG_Operation* Default_Engine::eckaeg_op(const EC_Domain_Params& dom_pars, + const BigInt& priv_key, + const PointGFp& pub_key) const + { + return new Default_ECKAEG_Op(dom_pars, priv_key, pub_key); + } +#endif + +} |