Returns k such that b ^ k = 1 ( mod p )
def order ( p , b ) : NEW_LINE INDENT if ( gcd ( p , b ) != 1 ) : NEW_LINE INDENT print ( " p and b are not co - prime . " ) ; NEW_LINE return - 1 ; NEW_LINE DEDENT DEDENT