mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-19 22:46:36 -05:00
Use primitive generator 3 for AES Cauchy mode
This commit is contained in:
parent
15831064a1
commit
d997fe43a0
11 changed files with 5454 additions and 5034 deletions
14
raid/raid.c
14
raid/raid.c
|
|
@ -398,20 +398,20 @@ void raid_rec1of1(int *id, int nd, size_t size, void **v)
|
|||
* Starting from the equations:
|
||||
*
|
||||
* Pd = Dx + Dy
|
||||
* Qd = 2^id[0] * Dx + 2^id[1] * Dy
|
||||
* Qd = g^id[0] * Dx + g^id[1] * Dy
|
||||
*
|
||||
* and solving we get:
|
||||
*
|
||||
* 1 2^(-id[0])
|
||||
* 1 g^(-id[0])
|
||||
* Dy = ------------------- * Pd + ------------------- * Qd
|
||||
* 2^(id[1]-id[0]) + 1 2^(id[1]-id[0]) + 1
|
||||
* g^(id[1]-id[0]) + 1 g^(id[1]-id[0]) + 1
|
||||
*
|
||||
* Dx = Dy + Pd
|
||||
*
|
||||
* with conditions:
|
||||
*
|
||||
* 2^id[0] != 0
|
||||
* 2^(id[1]-id[0]) + 1 != 0
|
||||
* g^id[0] != 0
|
||||
* g^(id[1]-id[0]) + 1 != 0
|
||||
*
|
||||
* That are always satisfied for any 0<=id[0]<id[1]<255.
|
||||
*/
|
||||
|
|
@ -426,8 +426,8 @@ void raid_rec2of2_int8(int *id, int *ip, int nd, size_t size, void **vv)
|
|||
const uint8_t *T[2];
|
||||
|
||||
/* get multiplication tables */
|
||||
T[0] = table(inv(pow2(id[1] - id[0]) ^ 1));
|
||||
T[1] = table(inv(pow2(id[0]) ^ pow2(id[1])));
|
||||
T[0] = table(inv(powgen(id[1] - id[0]) ^ 1));
|
||||
T[1] = table(inv(powgen(id[0]) ^ powgen(id[1])));
|
||||
|
||||
/* compute delta parity */
|
||||
raid_delta_gen(2, id, ip, nd, size, vv);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue