Skip to content

Instantly share code, notes, and snippets.

@PavelJurasek
Created October 13, 2016 09:52
Show Gist options
  • Save PavelJurasek/ac58b7ed485278cc9063029b377e0a3f to your computer and use it in GitHub Desktop.
Save PavelJurasek/ac58b7ed485278cc9063029b377e0a3f to your computer and use it in GitHub Desktop.
m(x) = x^8 + x^4 + x^3 + x + 1
a = 06 => x^2 + x
b = 2E => x^5 + x^3 + x^2 + x
a + b = x^5 + x^3 + 2x^2 + 2x
= x^5 + x^3
a * b = x^7 + x^6 + x^5 + 2x^4 + 2x^3 + x^2
= x^7 + x^6 + x^5 + x^2
b ^ 2 = x^10 + 2x^8 + 2x^7 + 3x^6 + 2x^5 + 3x^4 + 2x^3 + x^2
= x^10 + 3x^6 + 3x^4 + x^2 = x^10 + x^6 + x^4 + x^2
(x^10 + x^6 + x^4 + x^2) / (x^8 + x^4 + x^3 + x + 1) = x^2
-(x^10 + x^6 + x^5 + x^3 + x^2)
-x^5 + x^4 - x^3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment