Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Extended Euclidean algorithm
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{short description|Method for computing the relation of two integers with their greatest common divisor}} In [[arithmetic]] and [[computer programming]], the '''extended Euclidean algorithm''' is an extension to the [[Euclidean algorithm]], and computes, in addition to the [[greatest common divisor]] (gcd) of integers ''a'' and ''b'', also the coefficients of [[Bézout's identity]], which are integers ''x'' and ''y'' such that : <math>ax + by = \gcd(a, b).</math> This is a [[certifying algorithm]], because the gcd is the only number that can simultaneously satisfy this equation and divide the inputs.<ref>{{cite web |last1=McConnell |first1=Ross |last2=Mehlhorn |first2=Kurt |last3=Näher |first3=Stefan |last4=Schweitzer |first4=Pascal |title=Certifying Algorithms |url=https://people.mpi-inf.mpg.de/~mehlhorn/ftp/CertifyingAlgorithms.pdf |access-date=29 September 2024}}</ref> It allows one to compute also, with almost no extra cost, the quotients of ''a'' and ''b'' by their greatest common divisor. {{em|Extended Euclidean algorithm}} also refers to a [[Polynomial greatest common divisor#Bézout's identity and extended GCD algorithm|very similar algorithm]] for computing the [[polynomial greatest common divisor]] and the coefficients of Bézout's identity of two [[univariate polynomial]]s. The extended Euclidean algorithm is particularly useful when ''a'' and ''b'' are [[coprime]]. With that provision, ''x'' is the [[modular multiplicative inverse]] of ''a'' [[modular arithmetic|modulo]] ''b'', and ''y'' is the modular multiplicative inverse of ''b'' modulo ''a''. Similarly, the polynomial extended Euclidean algorithm allows one to compute the [[multiplicative inverse]] in [[algebraic field extension]]s and, in particular in [[finite field]]s of non prime order. It follows that both extended Euclidean algorithms are widely used in [[cryptography]]. In particular, the computation of the [[modular multiplicative inverse]] is an essential step in the derivation of key-pairs in the [[RSA (algorithm)|RSA]] public-key encryption method.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)