Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:mpute roots of a degree 4 polynomial over GF(2^m)

Proto:static int find_poly_deg4_roots(struct bch_control *bch, struct gf_poly *poly, unsigned int *roots)

Type:int

Parameter:

TypeParameterName
struct bch_control *bch
struct gf_poly *poly
unsigned int *roots
648  n = 0
649  e = 0
651  If polynomial terms [0] == 0 Then Return 0
655  e4 = polynomial terms [4]
656  d = gf_div(bch, polynomial terms [0], e4)
657  c = gf_div(bch, polynomial terms [1], e4)
658  b = gf_div(bch, polynomial terms [2], e4)
659  a = gf_div(bch, polynomial terms [3], e4)
662  If a Then
664  If c Then
666  f = gf_div(bch, c, a)
667  l = a_log(bch, f)
668  l += If l & 1 Then GF_N(bch) Else 0
669  e = a_pow(bch, l / 2)
681  If d == 0 Then Return 0
685  c2 = gf_inv(bch, d)
686  b2 = gf_div(bch, a, d)
687  a2 = gf_div(bch, b, d)
688  Else
690  c2 = d
691  b2 = c
692  a2 = b
695  If 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). == 4 Then
696  When i < 4 cycle
698  f = If a Then gf_inv(bch, roots[i]) Else roots[i]
699  roots[i] = a_ilog(bch, f ^ e)
701  n = 4
703  Return n
Caller
NameDescribe
find_poly_rootsd roots of a polynomial, using BTZ algorithm; see the beginning of this* file for details