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!
====Example==== For example, if the polynomial used to define the finite field GF(2<sup>8</sup>) is {{math|1=''p'' = ''x''<sup>8</sup> + ''x''<sup>4</sup> + ''x''<sup>3</sup> + ''x'' + 1}}, and {{math|1=''a'' = ''x''<sup>6</sup> + ''x''<sup>4</sup> + ''x'' + 1}} is the element whose inverse is desired, then performing the algorithm results in the computation described in the following table. Let us recall that in fields of order 2<sup>''n''</sup>, one has −''z'' = ''z'' and ''z'' + ''z'' = 0 for every element ''z'' in the field). Since 1 is the only nonzero element of GF(2), the adjustment in the last line of the pseudocode is not needed. {| class="wikitable" |- ! step ! quotient ! r, newr ! s, news ! t, newt |- ! | | {{math|1=''p'' = ''x''<sup>8</sup> + ''x''<sup>4</sup> + ''x''<sup>3</sup> + ''x'' + 1 }} |1 | 0 |- ! | | {{math|1=''a'' = ''x''<sup>6</sup> + ''x''<sup>4</sup> + ''x'' + 1}} |0 | 1 |- ! 1 | {{math|1=''x''<sup>2</sup> + 1}} | {{math|1=''x''<sup>2</sup> = ''p'' − ''a'' (''x''<sup>2</sup> + 1)}} |1 | {{math|1=''x''<sup>2</sup> + 1 = 0 − 1 · (''x''<sup>2</sup> + 1)}} |- ! 2 | {{math|1=''x''<sup>4</sup> + ''x''<sup>2</sup>}} | {{math|1=''x'' + 1 = ''a'' − ''x''<sup>2</sup> (''x''<sup>4</sup> + ''x''<sup>2</sup>)}} | {{math|1=''x''<sup>4</sup>+''x''<sup>2</sup> = 0 − 1(''x''<sup>4</sup>+''x''<sup>2</sup>)}} | {{math|1=''x''<sup>6</sup> + ''x''<sup>2</sup> + 1 = 1 − (''x''<sup>4</sup> + ''x''<sup>2</sup>) (''x''<sup>2</sup> + 1)}} |- ! 3 | {{math|1=''x'' + 1}} | {{math|1= 1 = ''x''<sup>2</sup> − (''x'' + 1) (''x'' + 1)}} | {{math|1=''x''<sup>5</sup>+''x''<sup>4</sup>+''x''<sup>3</sup>+''x''<sup>2</sup>+1 = 1 − (''x'' +1)(''x''<sup>4</sup> + ''x''<sup>2</sup>)}} | {{math|1=''x''<sup>7</sup> + ''x''<sup>6</sup> + ''x''<sup>3</sup> + ''x'' = (''x''<sup>2</sup> + 1) − (''x'' + 1) (''x''<sup>6</sup> + ''x''<sup>2</sup> + 1)}} |- ! 4 | {{math|1=''x'' + 1}} | {{math|1=0 = (''x'' + 1) − 1 Γ (''x'' + 1)}} | {{math|1=''x''<sup>6</sup> + ''x''<sup>4</sup> + ''x'' + 1 = (''x''<sup>4</sup>+''x''<sup>2</sup>) − (''x''+1)(''x''<sup>5</sup>+''x''<sup>4</sup>+''x''<sup>3</sup>+''x''<sup>2</sup>+1)}} | |} Thus, the inverse is {{math|''x''<sup>7</sup> + ''x''<sup>6</sup> + ''x''<sup>3</sup> + ''x''}}, as can be confirmed by [[finite field arithmetic|multiplying the two elements together]], and taking the remainder by {{mvar|p}} of the result.
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)