Issue #18

0 up
0 down
Open
jerasure/gf-complete#18
Created by Yuriy Kaminskiy

arm neon CARRY_FREE for gf(2**8) is broken with some (non-default) polynomials (e.g. 0x169 , 0x12d)

While trying to add 16-bit CARRY_FREE method to arm neon, I noticed that gf_w8_neon_clm_multiply_x is broken for x > 2. E.g.

$ : "Passes: prim_poly == 0x11d (default) and x == 2"
$ ../test/gf_unit 8 A 1 -m CARRY_FREE -
Args: 8 A 1 -m CARRY_FREE - / size (bytes): 72
# : "Fails: prim_poly == 0x12d and x == 3"
$ ../test/gf_unit 8 A 1 -p 0x12d -m CARRY_FREE -
Args: 8 A 1 -p 0x12d -m CARRY_FREE - / size (bytes): 72
Error in single multiplication/division (all numbers in hex):

  gf.multiply(gf, 2, 1) = 2, but gf.divide(gf, 2, 2) = 2c
# : "Fails: prim_poly == 0x169 and x == 4"
$ ../test/gf_unit 8 A 1 -p 0x169 -m CARRY_FREE -
Args: 8 A 1 -p 0x169 -m CARRY_FREE - / size (bytes): 72
Error in single multiplication/division (all numbers in hex):

  gf.multiply(gf, 2, 1) = 2, but gf.divide(gf, 2, 2) = 68

(fix is almost ready, will send pull request later)

Assignee: None
Milestone: None
1 participant