aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pubkey/pk_ops.h
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2016-02-28 02:43:57 -0500
committerJack Lloyd <[email protected]>2016-03-20 09:38:17 -0400
commitada363473a9491a3b07e3bb6fa2b5fd9f12aec98 (patch)
tree0dc7eefb24c3d9983e45dd6e2e7f0876179c8c11 /src/lib/pubkey/pk_ops.h
parentf70a9de37d22282d8cca465632efd0044ab9008c (diff)
Add PK_Decryptor::decrypt_or_random
Performs content checks on the value (expected length, expected bytes) and in constant time returns either the decrypted value or a random value.
Diffstat (limited to 'src/lib/pubkey/pk_ops.h')
-rw-r--r--src/lib/pubkey/pk_ops.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/pubkey/pk_ops.h b/src/lib/pubkey/pk_ops.h
index 6fc21ea4a..712b8c457 100644
--- a/src/lib/pubkey/pk_ops.h
+++ b/src/lib/pubkey/pk_ops.h
@@ -68,7 +68,9 @@ class BOTAN_DLL Decryption
virtual size_t max_input_bits() const = 0;
- virtual secure_vector<byte> decrypt(const byte msg[], size_t msg_len) = 0;
+ virtual secure_vector<byte> decrypt(byte& valid_mask,
+ const byte ciphertext[],
+ size_t ciphertext_len) = 0;
virtual ~Decryption() {}
};