First version
Added prime strength check (smoothness of p-1)
Merge origin/master