|
Givaro
|
RSA domain. More...
#include <givintrsa.h>
Inheritance diagram for IntRSADom< MyRandIter >:
Collaboration diagram for IntRSADom< MyRandIter >:Public Member Functions | |
| IntRSADom (bool fi=false, MyRandIter g=MyRandIter()) | |
| Constructors. | |
| const Element & | getn () const |
| Accesses. | |
| std::ostream & | encipher (std::ostream &, std::istream &) const |
| Text conversions. | |
| Element & | strong_prime (random_generator &g, int64_t psize, Element &p) const |
| Strong Primes. More... | |
| void | keys_gen (random_generator &g, int64_t psize, int64_t qsize, Element &n, Element &e, Element &d, Element &p, Element &q) const |
| Key gen. More... | |
| int64_t | log (const Element &n, const int64_t=10) const |
| log[10] | |
| std::ostream & | ecriture_str (std::ostream &, const Element &) const |
| Text conversions. | |
| Element & | point_break (Element &u) |
| Breaking codes : finding u knowing only m an k ... | |
| bool | set (Container1 &setint, Container2 &setpwd, const Rep &a, unsigned long loops=0) const |
| Factors with primes. | |
| Rep & | Erathostene (Rep &, const Rep &p) const |
| returns a small factor | |
| bool | isUnit (const Rep &x) const |
| isUnit | |
| bool | isDivisor (const Element &a, const Element &b) const |
| isDivisor (a, b) Test if b | a. | |
Protected Attributes | |
| bool | _fast_impl |
| Fast implementation. More... | |
RSA domain.
| IntRSADom< MyRandIter >::Element & strong_prime | ( | random_generator & | g, |
| int64_t | psize, | ||
| Element & | p | ||
| ) | const |
Strong Primes.
| void keys_gen | ( | random_generator & | g, |
| int64_t | psize, | ||
| int64_t | qsize, | ||
| Element & | n, | ||
| Element & | e, | ||
| Element & | d, | ||
| Element & | p, | ||
| Element & | q | ||
| ) | const |
Key gen.
Here m = p*q p and q are prime numbers of respective sizes psize, qsize Moreover p-1 and q-1 have one prime factor of respective size 2/3 since k.u = 1 mod (p-1)(q-1)
|
protected |
Fast implementation.
Means simple enciphering key, and deciphering via chinese remaindering.
1.8.17