Givaro
Public Member Functions | Protected Attributes
IntRSADom< RandIter > Class Template Reference

RSA domain. More...

#include <givintrsa.h>

+ Inheritance diagram for IntRSADom< RandIter >:

Public Member Functions

Element & strong_prime (random_generator &g, long psize, Element &p) const
 Strong Primes. More...
 
long log (const Element &n, const long=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 ...
 
template<class Container1 , class Container2 >
bool set (Container1 &setint, Container2 &setpwd, const Rep &a, unsigned long loops=0) const
 Factors with primes.
 
RepErathostene (Rep &, const Rep &p) const
 returns a small factor
 
 IntRSADom (bool fi=false, RandIter g=RandIter())
 Constructors.
 
 IntRSADom (const long s, bool fi=false, RandIter g=RandIter())
 Constructors.
 
 IntRSADom (const long p, const long q, bool fi=false, RandIter g=RandIter())
 Constructors.
 
 IntRSADom (const Element &n, const Element &e, const Element &d)
 Constructors.
 
 IntRSADom (const Element &n, const Element &e)
 Constructors.
 
const Element & getn () const
 Accesses.
 
const Element & gete () const
 Accesses.
 
const Element & getd () const
 Accesses.
 
std::ostream & encipher (std::ostream &, std::istream &) const
 Text conversions.
 
std::ostream & decipher (std::ostream &, std::istream &)
 Text conversions.
 
void keys_gen (random_generator &g, long psize, long qsize, Element &n, Element &e, Element &d, Element &p, Element &q) const
 Key gen. More...
 
void keys_gen (random_generator &g, long psize, long qsize, Element &n, Element &e, Element &d) const
 Key gen. More...
 

Protected Attributes

bool _fast_impl
 Fast implementation. More...
 

Detailed Description

template<class RandIter = GivRandom>
class Givaro::IntRSADom< RandIter >

RSA domain.

Examples:
examples/Integer/RSA_breaking.C, examples/Integer/RSA_decipher.C, examples/Integer/RSA_encipher.C, and examples/Integer/RSA_keys_generator.C.

Member Function Documentation

IntRSADom< RandIter >::Element & strong_prime ( random_generator &  g,
long  psize,
Element &  p 
) const

Strong Primes.

Bibliography:
  • J. Gordon, Strong Primes Are Easy to Find, EUROCRYPT'84, LNCS 209.
void keys_gen ( random_generator &  g,
long  psize,
long  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)

void keys_gen ( random_generator &  g,
long  psize,
long  qsize,
Element &  n,
Element &  e,
Element &  d 
) 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)

Field Documentation

bool _fast_impl
protected

Fast implementation.

Means simple enciphering key, and deciphering via chinese remaindering.

Warning
this means less security !

The documentation for this class was generated from the following files: