ÍG d dl mZ ddlmZmZ ddlmZmZmZm Z m Z mZ ddlm Z dZ ede Zde d Z G d de ZdS ) ) IntegerNative ) long_to_bytes bytes_to_long)load_pycryptodome_raw_libcreate_string_bufferget_raw_bufferbackendc_size_tc_ulonglong)getrandbitsz int monty_pow(const uint8_t *base, const uint8_t *exp, const uint8_t *modulus, uint8_t *out, size_t len, uint64_t seed); zCrypto.Math._modexpcustom)libraryapic . e Zd Zedd ZddZdS ) IntegerCustombigc |dk rn9|dk r$t | } | nt d t t | S )Nr littlezIncorrect byteorder) bytearrayreverse ValueErrorr r )byte_string byteorders |/builddir/build/BUILD/imunify360-venv-2.6.2/opt/imunify360/venv/lib64/python3.11/site-packages/Crypto/Math/_IntegerCustom.py from_byteszIntegerCustom.from_bytes; sb ( " "#K00K!!!!2333];77888 Nc ` t | }|dk rt d |t | j | | _ | S t | }|dk rt d |dk rt d |dz dk rt | j || | _ | S | j |k r| xj |z c_ t t t | j || }t | j | }t || }t || }t | } t | |||t | t t d } | rt d| z t t | }|| _ | S )Nr zExponent must not be negativezModulus must be positivezModulus cannot be zeror @ zmonty_pow failed with error: %d)intr pow_valueZeroDivisionErrorlenr maxr _raw_montgomery monty_powr r r r r )selfexponentmodulus exp_value mod_valuemax_lenbase_bexp_b modulus_bouterrorresults r inplace_powzIntegerCustom.inplace_powF s MM q==<=== ?dk955DKK LL q==7888>>#$<=== Madk9i@@DKK ;)##KK9$KKmCY $J$JKKLLt{G44i11!)W55 "7++))W%%B00 H>FGGG~c2233r )r )N)__name__ __module____qualname__staticmethodr r4 r r r r 9 sF 9 9 9 \90 0 0 0 0 0r r N)_IntegerNativer Crypto.Util.numberr r Crypto.Util._raw_apir r r r r r Crypto.Random.randomr c_defsr&