관리-도구
편집 파일: ElGamal.cpython-311.pyc
� O�Dg�! � �b � g d �Z ddlmZ ddlmZmZmZ ddlmZ d� Z d� Z G d� de� � Zd S ) )�generate� construct� ElGamalKey� )�Random)�generate_probable_safe_prime�test_probable_prime� COMPOSITE��Integerc � � t � � }t | |�� � |_ |j dz dz } t t j d|j |�� � d|j � � |_ |j dv r�@|j dz |j z dk r�W|j � |j � � }|j dz |z dk r�� t j d|j dz |�� � |_ t |j |j |j � � |_ |S )a Randomly generate a fresh, new ElGamal key. The key will be safe for use for both encryption and signature (although it should be used for **only one** purpose). Args: bits (int): Key length, or size (in bits) of the modulus *p*. The recommended value is 2048. randfunc (callable): Random number generation function; it should accept a single integer *N* and return a string of random *N* random bytes. Return: an :class:`ElGamalKey` object )� exact_bits�randfunc� � �� min_inclusive� max_exclusiver )r r r ) r r �p�powr �random_range�g�inverse�x�y)�bitsr �obj�q�ginvs �z/builddir/build/BUILD/imunify360-venv-2.4.0/opt/imunify360/venv/lib64/python3.11/site-packages/Crypto/PublicKey/ElGamal.pyr r "