ó
ÎühPc           @   s1   d  d l  Z  d  d l Z d  d l Z d   Z d S(   i˙˙˙˙Nc         C   s^  t  j |   } t |  } g  } d } x4 | D], } t j |  } | j |  | | 9} q. Wt j |  } g  } xc | D][ } g  }	 x? t d |  D]. }
 t j	 |
 |  d k r |	 j |
  q q W| j |	  qz Wg  } xx | D]p } g  } xB t d t | j
   D]( } | j
 | } | j | | |  qWt  j | |  } | j |  qć W| S(   Ni   i    (   t	   modmul_tmt   params_from_stringt   lent   sackintt   eulerphit   appendt	   modadd_gmt   get_elements_str_auxt   ranget   gcdt   residuest   modmul_t(   t   params_stringt	   mod_arrayt
   num_modulit	   phi_arrayt
   group_sizet   mt   phit   indicest
   phi_groupst	   phi_groupt   kt   eltst   indext   resarrayt   it   jt   elt(    (    sG   /homepages/25/d321765456/htdocs/pub_http_internet/src/sack/modmul_gm.pyt   get_elements_str0   s2    (   R    R   R   R   (    (    (    sG   /homepages/25/d321765456/htdocs/pub_http_internet/src/sack/modmul_gm.pyt   <module>   s   #