Botan  1.11.15
src/lib/pubkey/rfc6979/rfc6979.h
Go to the documentation of this file.
00001 /*
00002 * RFC 6979 Deterministic Nonce Generator
00003 * (C) 2014 Jack Lloyd
00004 *
00005 * Botan is released under the Simplified BSD License (see license.txt)
00006 */
00007 
00008 #ifndef BOTAN_RFC6979_GENERATOR_H__
00009 #define BOTAN_RFC6979_GENERATOR_H__
00010 
00011 #include <botan/bigint.h>
00012 #include <string>
00013 
00014 namespace Botan {
00015 
00016 /**
00017 * @param x the secret (EC)DSA key
00018 * @param q the group order
00019 * @param h the message hash already reduced mod q
00020 * @param hash the hash function used to generate h
00021 */
00022 BigInt BOTAN_DLL generate_rfc6979_nonce(const BigInt& x,
00023                                         const BigInt& q,
00024                                         const BigInt& h,
00025                                         const std::string& hash);
00026 
00027 std::string hash_for_deterministic_signature(const std::string& emsa);
00028 
00029 }
00030 
00031 #endif