Extend key testing
Add PRNG util, refactor key package