compute 2 ^ y mod n for n odd . concode_field_sep long R concode_elem_sep int s concode_elem_sep LongLong x concode_elem_sep long R_1 concode_elem_sep LongLong aN concode_elem_sep Product product concode_elem_sep long N_I concode_elem_sep LongLong xN_I concode_elem_sep long N concode_field_sep Montgomery set concode_elem_sep long m
long function ( final long arg0 ) { long loc0 = R - N ; long loc1 = loc0 << 1 ; if ( loc1 >= N ) loc1 -= N ; for ( long loc2 = Long . highestOneBit ( arg0 ) ; loc2 > 0 ; loc2 >>>= 1 ) { loc0 = product . m ( loc0 , loc0 ) ; if ( ( loc2 & arg0 ) != 0 ) loc0 = product . m ( loc0 , loc1 ) ; } return product . m ( loc0 , 1 ) ; }