January 15, 2002
Practical Aspects of Modern Cryptography
Extended Euclidean Algorithm
•
Given integers
A
and
B
, find integers
X
and
Y
such that
AX + BY = gcd(A,B)
.
•
•
When
gcd(A,B) = 1
, solve
AX mod B = 1
,
by finding
X
and
Y
such that
•
AX + BY = gcd(A,B) = 1
.
•
•
Compute
(C
÷A) mod B
as
C×(1÷A) mod B
.