This preview shows page 1. Sign up to view the full content.
Unformatted text preview: procedure slow mod ( b ∶ integer , n, m ∶ positive integers) x ∶ = 1 for i ∶ = to n x ∶ = x ⋅ b mod m { x equals b n mod m } ± ² ³ ´ Algorithm 7.0: Fast modular exponentiation procedure fast mod ( b ∶ integer , n = ( a k1 a k2 . . . a 1 a 2 ) 2 , m ∶ positive integers) x ∶ = 1 power ∶ = b mod m for i ∶ = to k1 if a i = 1 then x ∶ = ( x ⋅ power ) mod m power ∶ = ( power ⋅ power ) mod m { x equals b n mod m } 1...
View
Full
Document
This note was uploaded on 05/12/2010 for the course APPLIED ST 2010 taught by Professor Various during the Spring '10 term at Universidad Nacional Agraria La Molina.
 Spring '10
 Various

Click to edit the document details