diff options
author | René Korthaus <[email protected]> | 2016-10-18 11:41:33 +0200 |
---|---|---|
committer | René Korthaus <[email protected]> | 2016-10-19 09:13:38 +0200 |
commit | 61a7875fb261a049c70382517e83176b4108bb61 (patch) | |
tree | 0cf884b160918002abb72c53868152fa574668fb /src/lib/pubkey/blinding.h | |
parent | 47532b63e947e020df15a03d91f9d67657cd11dd (diff) |
Improve pubkey doxygen [ci skip]
Diffstat (limited to 'src/lib/pubkey/blinding.h')
-rw-r--r-- | src/lib/pubkey/blinding.h | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/src/lib/pubkey/blinding.h b/src/lib/pubkey/blinding.h index a6b266807..bc05d97e7 100644 --- a/src/lib/pubkey/blinding.h +++ b/src/lib/pubkey/blinding.h @@ -17,15 +17,38 @@ namespace Botan { class RandomNumberGenerator; /** -* Blinding Function Object +* Blinding Function Object. */ class BOTAN_DLL Blinder { public: + /** + * Blind a value. + * The blinding nonce k is freshly generated after + * BOTAN_BLINDING_REINIT_INTERVAL calls to blind(). + * BOTAN_BLINDING_REINIT_INTERVAL = 0 means a fresh + * nonce is only generated once. On every other call, + * an updated nonce is used for blinding: k' = k*k mod n. + * @param x value to blind + * @return blinded value + */ BigInt blind(const BigInt& x) const; + /** + * Unblind a value. + * @param x value to unblind + * @return unblinded value + */ BigInt unblind(const BigInt& x) const; + /** + * @param modulus the modulus + * @param rng the RNG to use for generating the nonce + * @param fwd_func a function that calculates the modular + * exponentiation of the public exponent and the given value (the nonce) + * @param inv_func a function that calculates the modular inverse + * of the given value (the nonce) + */ Blinder(const BigInt& modulus, RandomNumberGenerator& rng, std::function<BigInt (const BigInt&)> fwd_func, |