aboutsummaryrefslogtreecommitdiffstats
path: root/src/pk_pad/emsa.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-06-21 19:27:20 +0000
committerlloyd <[email protected]>2010-06-21 19:27:20 +0000
commit89ae6f4bc2ff25dc5625875e0cb57b78b28a0b6e (patch)
tree2e3e85fdefbd8d21ebab223a3947f34b890fdddc /src/pk_pad/emsa.h
parentce14ac149a3b3bf70b3554aeefcdb9de5976da34 (diff)
Doxygen
Diffstat (limited to 'src/pk_pad/emsa.h')
-rw-r--r--src/pk_pad/emsa.h34
1 files changed, 29 insertions, 5 deletions
diff --git a/src/pk_pad/emsa.h b/src/pk_pad/emsa.h
index 6d01beb7f..372eb836d 100644
--- a/src/pk_pad/emsa.h
+++ b/src/pk_pad/emsa.h
@@ -19,15 +19,39 @@ namespace Botan {
class BOTAN_DLL EMSA
{
public:
- virtual void update(const byte[], u32bit) = 0;
+ /**
+ * Add more data to the signature computation
+ * @param input some data
+ * @param length length of input in bytes
+ */
+ virtual void update(const byte input[], u32bit length) = 0;
+
+ /**
+ * @return raw hash
+ */
virtual SecureVector<byte> raw_data() = 0;
- virtual SecureVector<byte> encoding_of(const MemoryRegion<byte>&,
- u32bit,
+ /**
+ * Return the encoding of a message
+ * @param msg the result of raw_data()
+ * @param output_bits the desired output bit size
+ * @param rng a random number generator
+ * @return encoded signature
+ */
+ virtual SecureVector<byte> encoding_of(const MemoryRegion<byte>& msg,
+ u32bit output_bits,
RandomNumberGenerator& rng) = 0;
- virtual bool verify(const MemoryRegion<byte>&, const MemoryRegion<byte>&,
- u32bit) = 0;
+ /**
+ * Verify the encoding
+ * @param coded the received (coded) message representative
+ * @param raw the computed (local, uncoded) message representative
+ * @param key_bits the size of the key in bits
+ * @return true if coded is a valid encoding of raw, otherwise false
+ */
+ virtual bool verify(const MemoryRegion<byte>& coded,
+ const MemoryRegion<byte>& raw,
+ u32bit key_bits) = 0;
virtual ~EMSA() {}
};