Inverse2 |
{Calculates the inverse of in |
(1) if then |
(2) let which satiefy in ; |
(3) return ; |
(4) else if , then |
(5) return “ is not invertible”; |
(6) else if fails let satisfy ; |
(7) let GetFactors ; |
(8) if , then |
(9) Inverse2 ; |
(10) Inverse2 ; |
(11) calculate using Chinese remaindering (Lemma 5); |
(12) else |
(13) Inverse2 ; |
(14) calculate using Newton-Hensel lifting (Lemma 6); |
(15) endif |
(16) return ; |
(17) endif |
GetFactors |
(18) let ; |
(19) if ( then |
(20) return ; |
(21) endif |
(22) let ; |
(23) let ; |
(24) if then |
(25) return ; |
(26) endif |
(27) let ; |
(28) return ; |