Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(8)  |  Call(6)  |  Derive(0)  |  Import(2)
Class for representing polynomials whose coefficients are GF256elt.

src/p/y/PySSSS-HEAD/pyssss/PGF256Interpolator.py   PySSSS(Download)
 
from GF256elt import GF256elt
from PGF256 import PGF256
 
class PGF256Interpolator:
 
    if (2 == len(points)):
      x = PGF256((GF256elt(0),GF256elt(1)))
      P = PGF256([points[1][1]]) * (x - points[0][0]) * (GF256elt(1) / (points[1][0] - points[0][0]))
      P = P + PGF256([points[0][1]]) * (x - points[1][0]) * (GF256elt(1) / (points[0][0] - points[1][0]));
    # 
 
    result = PGF256([GF256elt(0)])
 
    for j in xrange(0,len(points)):

src/p/y/PySSSS-HEAD/pyssss/PySSSS.py   PySSSS(Download)
 
from GF256elt import GF256elt
from PGF256 import PGF256
from PGF256Interpolator import PGF256Interpolator
 
  coeffs.append(GF256elt(random.randint(1,255)))
 
  return PGF256(coeffs)