Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\bch.c Create Date:2022-07-28 06:59:48
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:his function builds and solves a linear system for finding roots of a degree* 4 affine monic polynomial X^4+aX^2+bX+c over GF(2^m).

Proto:static int find_affine4_roots(struct bch_control *bch, unsigned int a, unsigned int b, unsigned int c, unsigned int *roots)

Type:int

Parameter:

TypeParameterName
struct bch_control *bch
unsigned inta
unsigned intb
unsigned intc
unsigned int *roots
523  m = GF_M(bch)
524  unsigned int mask = 0xff, t, rows[16] = {0, }
526  j = a_log(bch, b)
527  k = a_log(bch, a)
528  rows[0] = c
531  When i < m cycle
532  rows[i + 1] = private: [4 * i] ^ If a Then private: [shorter and faster modulo function, only works when v < 2N.] Else 0 ^ If b Then private: [shorter and faster modulo function, only works when v < 2N.] Else 0
535  j++
536  k += 2
542  When j != 0 cycle
543  When k < 16 cycle
544  t = ( rows[k] >> j ^ rows[k + j]) & mask
545  rows[k] ^= t << j
546  rows[k + j] ^= t
549  Return solve a m x m linear system in GF(2) with an expected number of solutions,* and return the number of found solutions
Caller
NameDescribe
find_poly_deg3_rootsmpute roots of a degree 3 polynomial over GF(2^m)
find_poly_deg4_rootsmpute roots of a degree 4 polynomial over GF(2^m)