News for hackers. Stuff that matters.
Re:Galois field instructions on 2021 CPUs by chriswarbo on Sunday November 06, 2022 @01:20PM (#33495501)
It's mentioned later, but the "math friendly" versions satisfy the axioms of a group and a field, which only works if the modulus is a prime.

In particular, all non-zero values have a unique inverse:

> As 251 is prime, this reduction rule is math-friendly. By that, I mean that for any x other than zero, there is some y such that x * y == 1. For example, taking x of 16, we have 16 * 204 == 1. This property is not true for the 256 == 0 reduction rule; with that rule, there is no y such that 16 * y == 1. Where it exists, this y can be called inv(x) or 1/x.

Re:Galois field instructions on 2021 CPUs by hither_shores on Sunday November 06, 2022 @06:54PM (#33499059)
> It's mentioned later, but the "math friendly" versions satisfy the axioms of a group and a field, which only works if the modulus is a prime.

The integers mod n >= 1 are always a group (under addition), only the field structure requires prime n.

Re:Galois field instructions on 2021 CPUs by voldacar on Sunday November 06, 2022 @07:38PM (#33499493)
It doesn't have to be a prime, it can also be a prime power