Galois field inverse
$begingroup$
I'm trying to calculate the inverse of $x^{7}+x^{5}+x^{4}+x^{2}+x+1$ over $mathbb{Z}_{2}[x]/(x^{8}+1)$. I suspect there is something fundemental I'm misunderstanding about this process. I'm doing this using code I'm writing, verified by manual calculation, but it seems the problem is not with my code, but with my understanding of what needs to be done.
First of all, I tried applying the extended Euclidean algorithm, but I get that the GCD is $x+1$ (i.e. - that they are not coprime).
Also, as far as I can tell, $(x^{7}+x^{5}+x^{4}+x^{2}+x+1)*(x^{7}+x^{6}+x^{5}+x^{4}+x^{3}+x^{2}+x^{1}+1)=0$, suggesting it divides zero.
What am I misunderstanding?
polynomials finite-fields
$endgroup$
add a comment |
$begingroup$
I'm trying to calculate the inverse of $x^{7}+x^{5}+x^{4}+x^{2}+x+1$ over $mathbb{Z}_{2}[x]/(x^{8}+1)$. I suspect there is something fundemental I'm misunderstanding about this process. I'm doing this using code I'm writing, verified by manual calculation, but it seems the problem is not with my code, but with my understanding of what needs to be done.
First of all, I tried applying the extended Euclidean algorithm, but I get that the GCD is $x+1$ (i.e. - that they are not coprime).
Also, as far as I can tell, $(x^{7}+x^{5}+x^{4}+x^{2}+x+1)*(x^{7}+x^{6}+x^{5}+x^{4}+x^{3}+x^{2}+x^{1}+1)=0$, suggesting it divides zero.
What am I misunderstanding?
polynomials finite-fields
$endgroup$
$begingroup$
Extended Euclidean algorithm gives the answer.
$endgroup$
– Wuestenfux
Dec 16 '18 at 12:50
1
$begingroup$
To really get into Galois field inverses you would need to replace $x^8+1$ with an irreducible degree eight polynomial. See for example this thread for a well worked out example about finding the inverse of an element in a degree eight extension field.
$endgroup$
– Jyrki Lahtonen
Dec 16 '18 at 13:46
$begingroup$
+1 for having a correct example. Your other degree seven polynomial is $$x^7+x^6+x^5+x^4+x^3+x^2+x+1=(x+1)^7.$$ Basically because all the binomial coefficients $binom 7k, k=0,1,ldots,7$ are odd. The six term polynomial is divisible by $x+1$, so the product of those two degree seven polynomials is divisible by $(x+1)^8=x^8+1$, and hence equal to zero in the quotient ring.
$endgroup$
– Jyrki Lahtonen
Dec 16 '18 at 13:54
add a comment |
$begingroup$
I'm trying to calculate the inverse of $x^{7}+x^{5}+x^{4}+x^{2}+x+1$ over $mathbb{Z}_{2}[x]/(x^{8}+1)$. I suspect there is something fundemental I'm misunderstanding about this process. I'm doing this using code I'm writing, verified by manual calculation, but it seems the problem is not with my code, but with my understanding of what needs to be done.
First of all, I tried applying the extended Euclidean algorithm, but I get that the GCD is $x+1$ (i.e. - that they are not coprime).
Also, as far as I can tell, $(x^{7}+x^{5}+x^{4}+x^{2}+x+1)*(x^{7}+x^{6}+x^{5}+x^{4}+x^{3}+x^{2}+x^{1}+1)=0$, suggesting it divides zero.
What am I misunderstanding?
polynomials finite-fields
$endgroup$
I'm trying to calculate the inverse of $x^{7}+x^{5}+x^{4}+x^{2}+x+1$ over $mathbb{Z}_{2}[x]/(x^{8}+1)$. I suspect there is something fundemental I'm misunderstanding about this process. I'm doing this using code I'm writing, verified by manual calculation, but it seems the problem is not with my code, but with my understanding of what needs to be done.
First of all, I tried applying the extended Euclidean algorithm, but I get that the GCD is $x+1$ (i.e. - that they are not coprime).
Also, as far as I can tell, $(x^{7}+x^{5}+x^{4}+x^{2}+x+1)*(x^{7}+x^{6}+x^{5}+x^{4}+x^{3}+x^{2}+x^{1}+1)=0$, suggesting it divides zero.
What am I misunderstanding?
polynomials finite-fields
polynomials finite-fields
edited Dec 16 '18 at 13:37
Jyrki Lahtonen
108k12166369
108k12166369
asked Dec 16 '18 at 12:01
Shachar ShemeshShachar Shemesh
1114
1114
$begingroup$
Extended Euclidean algorithm gives the answer.
$endgroup$
– Wuestenfux
Dec 16 '18 at 12:50
1
$begingroup$
To really get into Galois field inverses you would need to replace $x^8+1$ with an irreducible degree eight polynomial. See for example this thread for a well worked out example about finding the inverse of an element in a degree eight extension field.
$endgroup$
– Jyrki Lahtonen
Dec 16 '18 at 13:46
$begingroup$
+1 for having a correct example. Your other degree seven polynomial is $$x^7+x^6+x^5+x^4+x^3+x^2+x+1=(x+1)^7.$$ Basically because all the binomial coefficients $binom 7k, k=0,1,ldots,7$ are odd. The six term polynomial is divisible by $x+1$, so the product of those two degree seven polynomials is divisible by $(x+1)^8=x^8+1$, and hence equal to zero in the quotient ring.
$endgroup$
– Jyrki Lahtonen
Dec 16 '18 at 13:54
add a comment |
$begingroup$
Extended Euclidean algorithm gives the answer.
$endgroup$
– Wuestenfux
Dec 16 '18 at 12:50
1
$begingroup$
To really get into Galois field inverses you would need to replace $x^8+1$ with an irreducible degree eight polynomial. See for example this thread for a well worked out example about finding the inverse of an element in a degree eight extension field.
$endgroup$
– Jyrki Lahtonen
Dec 16 '18 at 13:46
$begingroup$
+1 for having a correct example. Your other degree seven polynomial is $$x^7+x^6+x^5+x^4+x^3+x^2+x+1=(x+1)^7.$$ Basically because all the binomial coefficients $binom 7k, k=0,1,ldots,7$ are odd. The six term polynomial is divisible by $x+1$, so the product of those two degree seven polynomials is divisible by $(x+1)^8=x^8+1$, and hence equal to zero in the quotient ring.
$endgroup$
– Jyrki Lahtonen
Dec 16 '18 at 13:54
$begingroup$
Extended Euclidean algorithm gives the answer.
$endgroup$
– Wuestenfux
Dec 16 '18 at 12:50
$begingroup$
Extended Euclidean algorithm gives the answer.
$endgroup$
– Wuestenfux
Dec 16 '18 at 12:50
1
1
$begingroup$
To really get into Galois field inverses you would need to replace $x^8+1$ with an irreducible degree eight polynomial. See for example this thread for a well worked out example about finding the inverse of an element in a degree eight extension field.
$endgroup$
– Jyrki Lahtonen
Dec 16 '18 at 13:46
$begingroup$
To really get into Galois field inverses you would need to replace $x^8+1$ with an irreducible degree eight polynomial. See for example this thread for a well worked out example about finding the inverse of an element in a degree eight extension field.
$endgroup$
– Jyrki Lahtonen
Dec 16 '18 at 13:46
$begingroup$
+1 for having a correct example. Your other degree seven polynomial is $$x^7+x^6+x^5+x^4+x^3+x^2+x+1=(x+1)^7.$$ Basically because all the binomial coefficients $binom 7k, k=0,1,ldots,7$ are odd. The six term polynomial is divisible by $x+1$, so the product of those two degree seven polynomials is divisible by $(x+1)^8=x^8+1$, and hence equal to zero in the quotient ring.
$endgroup$
– Jyrki Lahtonen
Dec 16 '18 at 13:54
$begingroup$
+1 for having a correct example. Your other degree seven polynomial is $$x^7+x^6+x^5+x^4+x^3+x^2+x+1=(x+1)^7.$$ Basically because all the binomial coefficients $binom 7k, k=0,1,ldots,7$ are odd. The six term polynomial is divisible by $x+1$, so the product of those two degree seven polynomials is divisible by $(x+1)^8=x^8+1$, and hence equal to zero in the quotient ring.
$endgroup$
– Jyrki Lahtonen
Dec 16 '18 at 13:54
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
I'm afraid the element you described has no inverse in the quotient ring $Bbb{Z}_2[x]/langle x^8+1rangle$.
This is because your degree seven polynomial $f(x)=x^7+x^5+x^4+x^2+x+1$ shares a factor $x+1$ with $g(x)=x^8+1$. The easiest way of seeing this is to observe that $f(1)=0=g(1)$ so they are both divisible by $x-1=x+1$.
You can tell it at a glance because both polynomials have an even number of terms.
The quotient ring $Bbb{Z}_2[x]/langle g(x)rangle$ is a field if and only if $g(x)$ is irreducible. When $g(x)$ is irreducible it obviously cannot have common factors with lower degree polynomials, and extended Euclid works like charm and finds the inverse.
A popular choice for a degree $8$ irreducible polynomial is $g(x)=x^8+x^4+x^3+x+1$ specified in Rijndael/AES crypto standard<.
$endgroup$
1
$begingroup$
If $h(x)$ is any polynomial we still have $h(1)f(1)=0$ and this makes it impossible for $h(x)f(x)$ to be congruent to $1$ modulo $g(x)$.
$endgroup$
– Jyrki Lahtonen
Dec 16 '18 at 13:36
1
$begingroup$
so this is what I misunderstood. Not all polynoms create fields under GF.
$endgroup$
– Shachar Shemesh
Dec 16 '18 at 13:42
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3042524%2fgalois-field-inverse%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
I'm afraid the element you described has no inverse in the quotient ring $Bbb{Z}_2[x]/langle x^8+1rangle$.
This is because your degree seven polynomial $f(x)=x^7+x^5+x^4+x^2+x+1$ shares a factor $x+1$ with $g(x)=x^8+1$. The easiest way of seeing this is to observe that $f(1)=0=g(1)$ so they are both divisible by $x-1=x+1$.
You can tell it at a glance because both polynomials have an even number of terms.
The quotient ring $Bbb{Z}_2[x]/langle g(x)rangle$ is a field if and only if $g(x)$ is irreducible. When $g(x)$ is irreducible it obviously cannot have common factors with lower degree polynomials, and extended Euclid works like charm and finds the inverse.
A popular choice for a degree $8$ irreducible polynomial is $g(x)=x^8+x^4+x^3+x+1$ specified in Rijndael/AES crypto standard<.
$endgroup$
1
$begingroup$
If $h(x)$ is any polynomial we still have $h(1)f(1)=0$ and this makes it impossible for $h(x)f(x)$ to be congruent to $1$ modulo $g(x)$.
$endgroup$
– Jyrki Lahtonen
Dec 16 '18 at 13:36
1
$begingroup$
so this is what I misunderstood. Not all polynoms create fields under GF.
$endgroup$
– Shachar Shemesh
Dec 16 '18 at 13:42
add a comment |
$begingroup$
I'm afraid the element you described has no inverse in the quotient ring $Bbb{Z}_2[x]/langle x^8+1rangle$.
This is because your degree seven polynomial $f(x)=x^7+x^5+x^4+x^2+x+1$ shares a factor $x+1$ with $g(x)=x^8+1$. The easiest way of seeing this is to observe that $f(1)=0=g(1)$ so they are both divisible by $x-1=x+1$.
You can tell it at a glance because both polynomials have an even number of terms.
The quotient ring $Bbb{Z}_2[x]/langle g(x)rangle$ is a field if and only if $g(x)$ is irreducible. When $g(x)$ is irreducible it obviously cannot have common factors with lower degree polynomials, and extended Euclid works like charm and finds the inverse.
A popular choice for a degree $8$ irreducible polynomial is $g(x)=x^8+x^4+x^3+x+1$ specified in Rijndael/AES crypto standard<.
$endgroup$
1
$begingroup$
If $h(x)$ is any polynomial we still have $h(1)f(1)=0$ and this makes it impossible for $h(x)f(x)$ to be congruent to $1$ modulo $g(x)$.
$endgroup$
– Jyrki Lahtonen
Dec 16 '18 at 13:36
1
$begingroup$
so this is what I misunderstood. Not all polynoms create fields under GF.
$endgroup$
– Shachar Shemesh
Dec 16 '18 at 13:42
add a comment |
$begingroup$
I'm afraid the element you described has no inverse in the quotient ring $Bbb{Z}_2[x]/langle x^8+1rangle$.
This is because your degree seven polynomial $f(x)=x^7+x^5+x^4+x^2+x+1$ shares a factor $x+1$ with $g(x)=x^8+1$. The easiest way of seeing this is to observe that $f(1)=0=g(1)$ so they are both divisible by $x-1=x+1$.
You can tell it at a glance because both polynomials have an even number of terms.
The quotient ring $Bbb{Z}_2[x]/langle g(x)rangle$ is a field if and only if $g(x)$ is irreducible. When $g(x)$ is irreducible it obviously cannot have common factors with lower degree polynomials, and extended Euclid works like charm and finds the inverse.
A popular choice for a degree $8$ irreducible polynomial is $g(x)=x^8+x^4+x^3+x+1$ specified in Rijndael/AES crypto standard<.
$endgroup$
I'm afraid the element you described has no inverse in the quotient ring $Bbb{Z}_2[x]/langle x^8+1rangle$.
This is because your degree seven polynomial $f(x)=x^7+x^5+x^4+x^2+x+1$ shares a factor $x+1$ with $g(x)=x^8+1$. The easiest way of seeing this is to observe that $f(1)=0=g(1)$ so they are both divisible by $x-1=x+1$.
You can tell it at a glance because both polynomials have an even number of terms.
The quotient ring $Bbb{Z}_2[x]/langle g(x)rangle$ is a field if and only if $g(x)$ is irreducible. When $g(x)$ is irreducible it obviously cannot have common factors with lower degree polynomials, and extended Euclid works like charm and finds the inverse.
A popular choice for a degree $8$ irreducible polynomial is $g(x)=x^8+x^4+x^3+x+1$ specified in Rijndael/AES crypto standard<.
edited Dec 23 '18 at 4:16
answered Dec 16 '18 at 13:35
Jyrki LahtonenJyrki Lahtonen
108k12166369
108k12166369
1
$begingroup$
If $h(x)$ is any polynomial we still have $h(1)f(1)=0$ and this makes it impossible for $h(x)f(x)$ to be congruent to $1$ modulo $g(x)$.
$endgroup$
– Jyrki Lahtonen
Dec 16 '18 at 13:36
1
$begingroup$
so this is what I misunderstood. Not all polynoms create fields under GF.
$endgroup$
– Shachar Shemesh
Dec 16 '18 at 13:42
add a comment |
1
$begingroup$
If $h(x)$ is any polynomial we still have $h(1)f(1)=0$ and this makes it impossible for $h(x)f(x)$ to be congruent to $1$ modulo $g(x)$.
$endgroup$
– Jyrki Lahtonen
Dec 16 '18 at 13:36
1
$begingroup$
so this is what I misunderstood. Not all polynoms create fields under GF.
$endgroup$
– Shachar Shemesh
Dec 16 '18 at 13:42
1
1
$begingroup$
If $h(x)$ is any polynomial we still have $h(1)f(1)=0$ and this makes it impossible for $h(x)f(x)$ to be congruent to $1$ modulo $g(x)$.
$endgroup$
– Jyrki Lahtonen
Dec 16 '18 at 13:36
$begingroup$
If $h(x)$ is any polynomial we still have $h(1)f(1)=0$ and this makes it impossible for $h(x)f(x)$ to be congruent to $1$ modulo $g(x)$.
$endgroup$
– Jyrki Lahtonen
Dec 16 '18 at 13:36
1
1
$begingroup$
so this is what I misunderstood. Not all polynoms create fields under GF.
$endgroup$
– Shachar Shemesh
Dec 16 '18 at 13:42
$begingroup$
so this is what I misunderstood. Not all polynoms create fields under GF.
$endgroup$
– Shachar Shemesh
Dec 16 '18 at 13:42
add a comment |
Thanks for contributing an answer to Mathematics Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3042524%2fgalois-field-inverse%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
$begingroup$
Extended Euclidean algorithm gives the answer.
$endgroup$
– Wuestenfux
Dec 16 '18 at 12:50
1
$begingroup$
To really get into Galois field inverses you would need to replace $x^8+1$ with an irreducible degree eight polynomial. See for example this thread for a well worked out example about finding the inverse of an element in a degree eight extension field.
$endgroup$
– Jyrki Lahtonen
Dec 16 '18 at 13:46
$begingroup$
+1 for having a correct example. Your other degree seven polynomial is $$x^7+x^6+x^5+x^4+x^3+x^2+x+1=(x+1)^7.$$ Basically because all the binomial coefficients $binom 7k, k=0,1,ldots,7$ are odd. The six term polynomial is divisible by $x+1$, so the product of those two degree seven polynomials is divisible by $(x+1)^8=x^8+1$, and hence equal to zero in the quotient ring.
$endgroup$
– Jyrki Lahtonen
Dec 16 '18 at 13:54