Completed 1.2.4 and 1.2.5 (except Miller-Rabin)