1 /******************************************************************************* 2 This file is part of LibTMCG. 3 4 [CS00] Ronald Cramer, Victor Shoup: 'Signature schemes based on the 5 strong RSA assumption', ACM Transactions on Information and 6 System Security, Vol.3(3), pp. 161--185, 2000 7 8 [RS00] Jean-Francois Raymond, Anton Stiglic: 'Security Issues in the 9 Diffie-Hellman Key Agreement Protocol', ZKS technical report 10 http://citeseer.ist.psu.edu/455251.html 11 12 [HAC] Alfred J. Menezes, Paul C. van Oorschot, and Scott A. Vanstone: 13 'Handbook of Applied Cryptography', CRC Press, 1996. 14 15 Copyright (C) 2004, 2005, 2006, 2007, 16 2016, 2017, 2018, 2019 Heiko Stamer <HeikoStamer@gmx.net> 17 18 LibTMCG is free software; you can redistribute it and/or modify 19 it under the terms of the GNU General Public License as published by 20 the Free Software Foundation; either version 2 of the License, or 21 (at your option) any later version. 22 23 LibTMCG is distributed in the hope that it will be useful, 24 but WITHOUT ANY WARRANTY; without even the implied warranty of 25 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 GNU General Public License for more details. 27 28 You should have received a copy of the GNU General Public License 29 along with LibTMCG; if not, write to the Free Software 30 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 31 *******************************************************************************/ 32 33 #ifndef INCLUDED_mpz_sprime_HH 34 #define INCLUDED_mpz_sprime_HH 35 36 // GNU multiple precision library 37 #include <gmp.h> 38 39 void tmcg_mpz_sprime 40 (mpz_ptr p, mpz_ptr q, 41 const unsigned long int qsize, 42 const unsigned long int mr_iterations); 43 void tmcg_mpz_smprime 44 (mpz_ptr p, mpz_ptr q, 45 const unsigned long int qsize, 46 const unsigned long int mr_iterations); 47 void tmcg_mpz_sprime_naive 48 (mpz_ptr p, mpz_ptr q, 49 const unsigned long int qsize, 50 const unsigned long int mr_iterations); 51 void tmcg_mpz_sprime_noninc 52 (mpz_ptr p, mpz_ptr q, 53 const unsigned long int qsize, 54 const unsigned long int mr_iterations); 55 void tmcg_mpz_sprime2g 56 (mpz_ptr p, mpz_ptr q, 57 const unsigned long int qsize, 58 const unsigned long int mr_iterations); 59 void tmcg_mpz_sprime3mod4 60 (mpz_ptr p, 61 const unsigned long int psize, 62 const unsigned long int mr_iterations); 63 void tmcg_mpz_lprime 64 (mpz_ptr p, mpz_ptr q, mpz_ptr k, 65 const unsigned long int psize, 66 const unsigned long int qsize, 67 const unsigned long int mr_iterations); 68 void tmcg_mpz_lprime_prefix 69 (mpz_ptr p, mpz_ptr q, mpz_ptr k, 70 const unsigned long int psize, 71 const unsigned long int qsize, 72 const unsigned long int mr_iterations); 73 void tmcg_mpz_oprime 74 (mpz_ptr p, 75 const unsigned long int psize, 76 const unsigned long int mr_iterations); 77 void tmcg_mpz_oprime_noninc 78 (mpz_ptr p, 79 const unsigned long int psize, 80 const unsigned long int mr_iterations); 81 #endif 82 83