aboutsummaryrefslogtreecommitdiffstats
path: root/src/pubkey/pk_ops.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-03-05 17:21:40 +0000
committerlloyd <[email protected]>2010-03-05 17:21:40 +0000
commitdf8c46ffb5554d8804287b340e06f79fbafe8d1d (patch)
treed0f047eee908f3b85ce2d5e6b9b19a9e55ea3757 /src/pubkey/pk_ops.h
parent8df87a70435cae25e30f7045f7799537857e13d4 (diff)
Add ops for ElGamal encryption and decryption.
Note: blinding is not currently being used for RSA, RW, DH or ElGamal, which used to have them. This should be added back before release.
Diffstat (limited to 'src/pubkey/pk_ops.h')
-rw-r--r--src/pubkey/pk_ops.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/pubkey/pk_ops.h b/src/pubkey/pk_ops.h
index c749bc8ea..3f04b52dc 100644
--- a/src/pubkey/pk_ops.h
+++ b/src/pubkey/pk_ops.h
@@ -18,12 +18,25 @@ namespace PK_Ops {
class BOTAN_DLL Encryption
{
public:
+ virtual u32bit max_input_bits() const = 0;
+
virtual SecureVector<byte> encrypt(const byte msg[], u32bit msg_len,
RandomNumberGenerator& rng) const = 0;
virtual ~Encryption() {}
};
+class BOTAN_DLL Decryption
+ {
+ public:
+ virtual u32bit max_input_bits() const = 0;
+
+ virtual SecureVector<byte> decrypt(const byte msg[],
+ u32bit msg_len) const = 0;
+
+ virtual ~Decryption() {}
+ };
+
class BOTAN_DLL Signature
{
public: