original_docstring: 
  		generates keys and set the RSA values
  		
docstring: generates keys and set the RSA values
docstring_tokens: generates keys and set the RSA values
code: def generate_keys(self):
  		"""
  		generates keys and set the RSA values
  		"""
  
  		condition = False
  		
  			
  		while (not condition) :
  			# step 1 : chose random primary numbers p and q
  			n = generate_prime(self.min_bound,self.max_bound)
  			self._p = n
  			n = generate_prime(self.min_bound,self.max_bound)
  			while(n == self._p):
  				n = generate_prime(self.min_bound,self.max_bound)
  			self._q = n
  
  			#step 2 : compute n = pq
  			self.n = self._p * self._q
  			
  			a = find_invpow(self.n,4) // 3
  			condition = (self._p > self._q) and (self._p < 2 * self._q)
  			if (not condition) :
  				continue
  
  			print("step one OK")
  
  			#step 3 : compute phi(n)
  			self._phi = (self._p - 1) * (self._q - 1)
  
  			#step 4 : chose the exponent
  			n = randint(100,a)
  			while (gcd(self._phi,n) != 1):
  				n = randint(100,self._phi)
  			self._d = n
  
  			#step 5 : compute d (private key)
  			self.e = euclide_algorithm(self._d, self._phi)["U"] % self._phi
  
  			condition = (self._d < a)
  
  		print("p = ", self._p)
  		print("q = ", self._q)
  		print("d = ", self._d)
code_tokens: def generate_keys ( self ) : condition = False while ( not condition ) : n = generate_prime ( self . min_bound , self . max_bound ) self . _p = n n = generate_prime ( self . min_bound , self . max_bound ) while ( n == self . _p ) : n = generate_prime ( self . min_bound , self . max_bound ) self . _q = n self . n = self . _p * self . _q a = find_invpow ( self . n , 4 ) // 3 condition = ( self . _p > self . _q ) and ( self . _p < 2 * self . _q ) if ( not condition ) : continue print ( "step one OK" ) self . _phi = ( self . _p - 1 ) * ( self . _q - 1 ) n = randint ( 100 , a ) while ( gcd ( self . _phi , n ) != 1 ) : n = randint ( 100 , self . _phi ) self . _d = n self . e = euclide_algorithm ( self . _d , self . _phi ) [ "U" ] % self . _phi condition = ( self . _d < a ) print ( "p = " , self . _p ) print ( "q = " , self . _q ) print ( "d = " , self . _d )
short_docstring: generates keys and set the RSA values
short_docstring_tokens: generates keys and set the RSA values
comment: """
  		generates keys and set the RSA values
  		"""$SEP$# step 1 : chose random primary numbers p and q$SEP$#step 2 : compute n = pq$SEP$#step 3 : compute phi(n)$SEP$#step 4 : chose the exponent$SEP$#step 5 : compute d (private key)