k} ~ d dl mZ d dlmZ d dlmZmZ d dlmZ d Z
d Z G d de Z
G d d
e ZdS ) )
is_native_int)number)
long_to_bytes
bytes_to_long)get_random_bytesc N || k r|| }} d}|r|dz r|| z }| dz } |dz }||S )z!Multiply two polynomials in GF(2)r )f1f2zs /builddir/build/BUILD/imunify360-venv-2.6.2/opt/imunify360/venv/lib64/python3.11/site-packages/Crypto/Protocol/SecretSharing.py _mult_gf2r ( s[
BwwRB A
6
GA
q
q
H c | |k rd| fS t j }d}| } || } || |k r8d || |z
z }||z }|t || z } || |k 8||fS )z
Compute division of polynomials over GF(2).
Given a and b, it finds two polynomials q and r such that:
a = b*q + r with deg(r)