use the non-legacy crypto.random modules everywhere.
rename generatePublic to calculatePublic.

add compat so it doesn't break any working code.
add methods to generate private and public numbers.
bump version to 0.2.4