define RW 20131128 if_algo keypair libstate numbertheory