Questions tagged [finite-field]

In algebra, a finite field or Galois field (so named in honor of Évariste Galois) is a field that contains a finite number of elements.

In algebra, a finite field or Galois field (so named in honor of Évariste Galois) is a field that contains a finite number of elements, called its order (the size of the underlying set). As with any field, a finite field is a set on which the operations of commutative multiplication, addition, subtraction and division (by anything except zero) have been defined.

Read more: http://en.wikipedia.org/wiki/Finite_field

78 questions
1
vote
0 answers

Modelling finite field arithmetic mod p in Z3

I understand that in general, non-linear integer arithmetic is undecidable. However, this is not the case for the arithmetic of finite fields mod p, as in particular this can be reduced to a SAT problem over finite bit vectors. The reduction to SAT…
1
vote
1 answer

Correctness of multiplication in galois field

I'm into developing code to do arithmetic in Galois field gf(2^8) and I think I'm getting wrong results on multiplication operations. private static byte Multiply(byte a, byte b) { byte result = 0; while (b != 0) { if ((b & 1)…
Macko
  • 906
  • 3
  • 11
  • 27
1
vote
1 answer

How to list all invertible matrices over a finite field?

Given an odd prime, p, and integers n and m, I would like to quickly list all invertible m x m matrices whose entries come from the finite field of size p^n. What is an efficient way to do this? I could list all possible (p^n)^(m x m) matrices and…
1
vote
1 answer

Finding generators of a finite field

How to find generators of a finite field Fp[x]/f(x) with f(x) is a irreducible polynomial over Fp. Input: p (prime number), n (positive number), f (irreducible polynomial) Output: g (generator) I have p = 2, n =3, f = x^3 + x + 1 I am a newbie so I…
justinNg
  • 21
  • 1
  • 5
1
vote
2 answers

Fast computation of matrix rank over GF(2)

For my current project I need to be able to calculate the rank of 64*64 matrices with entries from GF(2). I was wondering if anyone had a good solution. I've been using pyfinite for this, but it is rather slow since it's a pure python…
Ewan Gilligan
  • 55
  • 1
  • 4
1
vote
0 answers

where does OpenSSL perform it's modular reductions on binary finite fields?

OpenSSL performs modular reductions when doing RSA but in order to maximize it's efficiency for elliptic curves over finite fields it'd need to do modular reduction for those as well. I'm curious in what file in the OpenSSL source code does OpenSSL…
neubert
  • 15,947
  • 24
  • 120
  • 212
1
vote
1 answer

Numpy matrix inversion with objects

I'm using the gf256 library to do galois field math, and I have it in a numpy matrix. Though when calling np.linalg.inv() with it, it throws an error. That's the summary, here's the details: import numpy as np from gf256 import GF256 as gf npgf =…
Daffy
  • 841
  • 9
  • 23
1
vote
1 answer

Shortcut for all the possible permutation of a set of numbers for m digits

I have been working on finite field. Suppose I have a prime number p=7. So I get a list q=[0,1,2,3,4,5,6]. Now I want all the possible permutation of the elements of set q for 7 places. For example [1,1,1,4,6,3,1] is one of the possible…
1
vote
1 answer

How do I compute the left null space for a matrix over GF(2) in MATLAB?

Let's say I have a matrix over GF(2) , i.e. a binary matrix. Now how do I go about computing the left null space of the given matrix over the finite field of 2? Does MATLAB provide an in-built function for this?
1
vote
2 answers

A Pure Python way to calculate the multiplicative inverse in gf(2^8) using Python 3

How would I implement the Multiplicative Inverse in GF2^8 in Python 3? My current functions look like this: def gf_add(a, b): return a ^ b def gf_mul(a, b, mod=0x1B): p = bytes(hex(0x00)) for i in range(8): if (b & 1) != 0: …
DarkPhoenix6
  • 54
  • 1
  • 9
1
vote
0 answers

Efficient finite field multiplication with log-antilog-table lookup in numpy

I am trying to implement efficient multiplication in GF(2^8), which elements are most naturally represented as uint8-numpy-values, in a numpy-thonic way. Therefore, I implemented GF-Arithmetics (in pure Python, not numpy) in order to build…
phynfo
  • 4,830
  • 1
  • 25
  • 38
1
vote
1 answer

How can I solve the sparse linear system with the coefficients in Z_2?

I want to solve a large sparse linear equation systems with coefficients in Z_2 using Eigen. First we have tried the Boolean type which does not work because 1+1=1 in Boolean but I expect 1+1=0. Hence a solution might be a new customised scalar…
Z. Ye
  • 23
  • 4
1
vote
0 answers

Irreducible polynomial in AES and GNU Octave

In the Rijndael AES proposal in section 2.1.2 they have chosen m(x) = x^8 + x^4 + x^3 + x + 1 and said it is an irreducible polynomial. This polynomial corresponds to integer 283. Further in section 4.2.3, they have defined the value of M, the…
siddhant
  • 837
  • 9
  • 13
1
vote
1 answer

In pari-gp, any stuff to map the finite field to its some extension?

Say, I have a polynomial p(x) over GF(2) and a polynomial g(x) over GF(4). For example, gf2 = gf(2, 1); gf4 = gf(2, 2); p2 = Polrev(vector(5, i, random(gf2))); p4 = Polrev(vector(7, i, random(gf4))); p2 * p4 >> *** at top-level: p2*p4 >> *** …
aka_test
  • 27
  • 5
1
vote
1 answer

In pari-gp, how to find a primitive element of finite field?

Say, I want a finite field containing q^n elements for some prime q and positive n. How to get its primitive element?
aka_test
  • 27
  • 5