openGPMP
Open Source Mathematics Package
logarithms.hpp
Go to the documentation of this file.
1 /*************************************************************************
2  *
3  * Project
4  * _____ _____ __ __ _____
5  * / ____| __ \| \/ | __ \
6  * ___ _ __ ___ _ __ | | __| |__) | \ / | |__) |
7  * / _ \| '_ \ / _ \ '_ \| | |_ | ___/| |\/| | ___/
8  *| (_) | |_) | __/ | | | |__| | | | | | | |
9  * \___/| .__/ \___|_| |_|\_____|_| |_| |_|_|
10  * | |
11  * |_|
12  *
13  * Copyright (C) Akiel Aries, <akiel@akiel.org>, et al.
14  *
15  * This software is licensed as described in the file LICENSE, which
16  * you should have received as part of this distribution. The terms
17  * among other details are referenced in the official documentation
18  * seen here : https://akielaries.github.io/openGPMP/ along with
19  * important files seen in this project.
20  *
21  * You may opt to use, copy, modify, merge, publish, distribute
22  * and/or sell copies of the Software, and permit persons to whom
23  * the Software is furnished to do so, under the terms of the
24  * LICENSE file. As this is an Open Source effort, all implementations
25  * must be of the same methodology.
26  *
27  *
28  *
29  * This software is distributed on an AS IS basis, WITHOUT
30  * WARRANTY OF ANY KIND, either express or implied.
31  *
32  ************************************************************************/
33 
40 #ifndef LOGARITHMS_HPP
41 #define LOGARITHMS_HPP
42 #include <cstdint>
43 #include <stdio.h>
44 #include <vector>
45 
46 namespace gpmp {
47 class Logarithms {
48  public:
49  /* integer factorization */
50  uint64_t pollard_rho_log(uint64_t a, uint64_t b, uint64_t m);
51 
52  /* Baby-Step Giant-Step */
53  uint64_t BSGS(uint64_t a, uint64_t b, uint64_t m);
54 
55  /* */
56  // uint64_t
57 };
58 
59 } // namespace gpmp
60 
61 #endif
uint64_t BSGS(uint64_t a, uint64_t b, uint64_t m)
Definition: logarithms.cpp:98
uint64_t pollard_rho_log(uint64_t a, uint64_t b, uint64_t m)
Definition: logarithms.cpp:58
The source C++ openGPMP namespace.