Clear[SymmetricPolynomialMod];
SymmetricPolynomialMod[0, x_, p_] := 0;
SymmetricPolynomialMod[a_, x_, p_] := 
      Module[{n}, 
n = 
          Exponent[a, 
            x]; 
(∑_(k = 0)^n) Mod[
              Coefficient[a, x, k], p, -(p/2)] 
            (x^k)
]

Clear[ZassenhausSchranke];
ZassenhausSchranke[a_, x_, m_] := 
      Module[{n, M, R}, 
n = 
          Exponent[a, x]; 
M = 
          Max[Table[(((Abs[Coefficient[a, x, n - k]])^(1/k))/Binomial)[n, k], {k, n}]]; 
R = (M/((2^(1/n)) - 1)); 
Max[
          Table[Binomial[m, k] (R^k), {k, n}]]
]

a = 
      (x^8) - 46 (x^7) - 1062 (x^6) + 4028 (x^5) - 4944 (x^4) + 2104 (x^3) - 
        66 (x^2) - 35 x + 2

liste = Table[Factor[a, Modulus -> Prime[n]], {n, 10}]

Map[Length, liste]

q = Prime[5]

fac = Factor[a, Modulus -> q]

b = SymmetricPolynomialMod[fac[[1]], x, q]

c = SymmetricPolynomialMod[fac[[2]], x, q]

Needs["Algebra`PolynomialExtendedGCD`"]

{g, {s, t}} = 
      PolynomialMod[Expand[PolynomialExtendedGCD[b, c, Modulus -> q]], 
        q]

Clear[HenselLifting]
HenselLifting[a_, b_, c_, s_, t_, x_, q_] := 
      Module[{k, B, C, d, S, T}, 
k = 
          Expand[((a - b c)/q)]; 
B = 
          SymmetricPolynomialMod[PolynomialRemainder[k t, b, x], x, 
            q]; 
C = 
          SymmetricPolynomialMod[PolynomialRemainder[k s, c, x], x, 
            q]; 
d = 
          s (b + q B) + t (c + q C) - 1; 
S = 
          SymmetricPolynomialMod[PolynomialRemainder[s d, c + q C, x], x, 
            (q^2)]; 
T = 
          SymmetricPolynomialMod[PolynomialRemainder[t d, b + q B, x], x, 
            (q^2)]; 
{Expand[b + q B], Expand[c + q C], 
          Expand[s - S], Expand[t - T], (q^2)}
]

{b, c, s, t, q} = HenselLifting[a, b, c, s, t, x, q]

{b, c, s, t, q} = HenselLifting[a, b, c, s, t, x, q]

Factor[a]

{PolynomialRemainder[a, b, x], PolynomialRemainder[a, c, x]}

Ceiling[ZassenhausSchranke[a, x, 4]]

{b, c, s, t, q} = HenselLifting[a, b, c, s, t, x, q]