CPU miner for Riecoin, Litecoin and Bitcoin using fermat prime test instead of miller rabin test