first pass at porting the RSA code

some functions aren't fully implemented, everything has tests, reverted
modification to b2s after realising test data is incorrect
fixed b2s test expected data
more work on rsa code, added some more utils and tests for them
updates to unit test data