finite-field

Finite Field Linear Algebra Library for Haskell

旧城冷巷雨未停 提交于 2020-01-11 04:55:11
问题 I'm searching for a finite field linear algebra library for Haskell. Something like FFLAS-FFPACK for Haskell would be great :-). Of course, I checked hmatrix, there seems to be some support for arbitrary matrix element types but I couldn't find any finite field library which works with hmatrix. And surely I'd appreciate a performant solution :-) In particular I want to be able to multiply 𝔽 p n×1 and 𝔽 p 1×m matrices (vectors) to 𝔽 p n×m matrices. 回答1: Your best bet would be a binding to

Interpolate polynomial over a finite field

十年热恋 提交于 2019-12-22 09:00:57
问题 I want to use python interpolate polynomial on points from a finite-field and get a polynomial with coefficients in that field. Currently I'm trying to use SymPy and specifically interpolate (from sympy.polys.polyfuncs ), but I don't know how to force the interpolation to happen in a specific gf. If not, can this be done with another module? Edit: I'm interested in a Python implementation/library. 回答1: SymPy's interpolating_poly does not support polynomials over finite fields. But there are

How can I find a solution of binary matrix equation AX = B?

南楼画角 提交于 2019-12-13 07:19:06
问题 Given an m*n binary matrix A, m*p binary matrix B, where n > m what is an efficient algorithm to compute X such that AX=B? For example: A = 1 1 0 0 1 1 0 1 0 0 1 1 0 0 1 0 1 0 0 1 0 1 1 0 1 0 1 0 1 0 1 1 1 1 1 0 0 1 1 0 0 1 1 0 1 0 1 1 1 0 B = 0 1 0 1 1 0 1 1 0 1 0 0 1 0 0 0 1 0 1 1 0 0 0 1 0 1 0 0 0 1 1 0 0 0 1 1 0 0 1 1 0 0 0 0 1 1 1 1 0 0 0 1 1 0 0 0 1 0 0 1 0 0 1 0 1 0 0 1 1 0 Note, when I say binary matrix I mean matrix defined over the field Z_2, that is, where all arithmetic is mod 2.

Fast Exponentiation for galois fields

房东的猫 提交于 2019-12-10 08:09:02
问题 I want to be able to compute g^x = g * g * g * ... * g (x times) where g is in a finite field GF(2^m). Here m is rather large, m = 256, 384, 512, etc. so lookup tables are not the solution. I know that there are really fast algorithms for a similar idea, modpow for Z/nZ (see page 619-620 of HAC). What is a fast, non-table based way to compute cycles (i.e. g^x)? This is definitely a wishful question but here it comes: Can the idea of montgomery multiplication/exponentiation be 'recycled' to

Implementing FFT over finite fields

冷暖自知 提交于 2019-12-06 23:52:04
问题 I would like to implement multiplication of polynomials using NTT. I followed Number-theoretic transform (integer DFT) and it seems to work. Now I would like to implement multiplication of polynomials over finite fields Z_p[x] where p is arbitrary prime number. Does it changes anything that the coefficients are now bounded by p , compared to the former unbounded case? In particular, original NTT required to find prime number N as the working modulus that is larger than (magnitude of largest

Fast Exponentiation for galois fields

假如想象 提交于 2019-12-05 18:17:03
I want to be able to compute g^x = g * g * g * ... * g (x times) where g is in a finite field GF(2^m). Here m is rather large, m = 256, 384, 512, etc. so lookup tables are not the solution. I know that there are really fast algorithms for a similar idea, modpow for Z/nZ (see page 619-620 of HAC ). What is a fast, non-table based way to compute cycles (i.e. g^x)? This is definitely a wishful question but here it comes: Can the idea of montgomery multiplication/exponentiation be 'recycled' to Galois fields? I would like to think so because of the isomorphic properties but I really don't know.

Finite Field Linear Algebra Library for Haskell

ぃ、小莉子 提交于 2019-12-01 03:45:41
I'm searching for a finite field linear algebra library for Haskell. Something like FFLAS-FFPACK for Haskell would be great :-). Of course, I checked hmatrix , there seems to be some support for arbitrary matrix element types but I couldn't find any finite field library which works with hmatrix. And surely I'd appreciate a performant solution :-) In particular I want to be able to multiply 𝔽 p n×1 and 𝔽 p 1×m matrices (vectors) to 𝔽 p n×m matrices. Your best bet would be a binding to FFLAS/FFPACK, that represents the data in native Haskell types. However, I can't see that we have such a

Finite Field (Galois Field) Linear Algebra Library for C (not C++)

白昼怎懂夜的黑 提交于 2019-12-01 01:47:06
问题 I'm searching for a finite field/galois field exact linear algebra library for C (C++ is not acceptable because I need to be able to write a Haskell-binding to it and that's apparently difficult with C++). I found libraries for like FFLAS-FFPACK and Givaro but these are C++-template libraries :-( In particular I want to be able to multiply 𝔽 p n×1 and 𝔽 p 1×m matrices (vectors) to 𝔽 p n×m matrices. So, does anyone know a C or "extern C" library that is suitable? PS: Here's my Haskell question