util: Added mod_powers, power_of_two.
rogue: Added valid.
join: simplifications.
sign: verification and minor cleanup.