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
  		"""
  
  		min_ext = 1 << self.size_ext - 1
  		max_ext = 1 << self.size_ext
  		
  			
  		# 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
  
  		#step 3 : compute phi(n)
  		self._phi = (self._p - 1) * (self._q - 1)
  
  		#step 4 : chose the exponent
  		extension = randint(min_ext,max_ext) << math.ceil(math.log2(self.D))
  		extension = extension + self.D
  		while (gcd(self._phi,n) != 1):
  			extension = randint(min_ext,max_ext) << math.ceil(math.log2(self.D))
  		self._d = extension
  
  		#step 5 : compute d (private key)
  		self.e = euclide_algorithm(self._d, self._phi)["U"] % self._phi
  
  		print("p = ", self._p)
  		print("q = ", self._q)
  		print("d = ", self._d)
code_tokens: def generate_keys ( self ) : min_ext = 1 << self . size_ext - 1 max_ext = 1 << self . size_ext 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 self . _phi = ( self . _p - 1 ) * ( self . _q - 1 ) extension = randint ( min_ext , max_ext ) << math . ceil ( math . log2 ( self . D ) ) extension = extension + self . D while ( gcd ( self . _phi , n ) != 1 ) : extension = randint ( min_ext , max_ext ) << math . ceil ( math . log2 ( self . D ) ) self . _d = extension self . e = euclide_algorithm ( self . _d , self . _phi ) [ "U" ] % self . _phi 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)