| Server IP : 217.160.0.135 / Your IP : 216.73.217.85 Web Server : Apache System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64 User : sws1074145052 ( 1074145052) PHP Version : 8.3.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /lib/python3/dist-packages/Cryptodome/Math/__pycache__/ |
Upload File : |
�
8�tc� � � � 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_lib�create_string_buffer�get_raw_buffer�backend�c_size_t�c_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);
zCryptodome.Math._modexp�custom)�library�apic �, � e Zd Zed� � � Zdd�ZdS )�
IntegerCustomc �: � t t | � � � � S �N)r r )�byte_strings �@/usr/lib/python3/dist-packages/Cryptodome/Math/_IntegerCustom.py�
from_byteszIntegerCustom.from_bytes; s � ��]�;�7�7�8�8�8� 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)�int�
ValueError�pow�_value�ZeroDivisionError�lenr �maxr �_raw_montgomery� monty_powr r r
r r )�self�exponent�modulus� exp_value� mod_value�max_len�base_b�exp_b� modulus_b�out�error�results r �inplace_powzIntegerCustom.inplace_pow? s� � ���M�M� ��q�=�=��<�=�=�=� �?��d�k�9�5�5�D�K��K� ��L�L� ��q�=�=��7�8�8�8���>�>�#�$<�=�=�=�
��M�a����d�k�9�i�@�@�D�K��K� �;�)�#�#��K�K�9�$�K�K��m�C���Y� �$J�$J�K�K�L�L���t�{�G�4�4���i��1�1��!�)�W�5�5� �"�7�+�+���)�)������W�%�%���B���0�0�
� �� � H��>��F�G�G�G��~�c�2�2�3�3������r r )�__name__�
__module__�__qualname__�staticmethodr r0 � r r r r 9 sA � � � � � ��9� 9� �\�9�0� 0� 0� 0� 0� 0r r N)�_IntegerNativer �Cryptodome.Util.numberr r �Cryptodome.Util._raw_apir r r r
r r �Cryptodome.Random.randomr
�c_defsr"