| Home | Trees | Indices | Help |
|---|
|
|
object --+
|
structure.sage_object.SageObject --+
|
MPolynomialRoundSystem_generic
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from Inherited from |
|||
|
|||
|
Inherited from |
|||
|
|||
Construct an object representing the equations of a single
round (e.g. of a block cipher).
INPUT:
R -- base ring
gens -- list (default: [])
EXAMPLE:
sage: P.<x,y,z> = PolynomialRing(GF(2),3)
sage: mq.MPolynomialRoundSystem(P,[x*y +1, z + 1])
[x*y + 1, z + 1]
|
Return a copy of this round system.
EXAMPLE:
sage: sr = mq.SR(allow_zero_inversions=True)
sage: F,s = sr.polynomial_system()
sage: r = F.round(0)
sage: copy(r)
[w100 + k000 + (a^3 + a + 1), w101 + k001 + (a^3 + 1),
w102 + k002 + (a^3 + a^2 + 1), w103 + k003 + (a^3 + a^2 +
a)]
|
Compare the ring and generators of self and other.
EXAMPLE:
sage: sr = mq.SR(allow_zero_inversions=True)
sage: F,s = sr.polynomial_system()
sage: F == copy(F) # indirect doctest
True
|
Return the base ring.
EXAMPLE:
sage: sr = mq.SR(allow_zero_inversions=True,gf2=True,order='block')
sage: F,s = sr.polynomial_system()
sage: R0 = F.round(0)
sage: print R0.ring().repr_long()
Polynomial Ring
Base Ring : Finite Field of size 2
Size : 20 Variables
Block 0 : Ordering : degrevlex
Names : k100, k101, k102, k103, x100, x101, x102, x103, w100, w101, w102, w103, s000, s001, s002, s003
Block 1 : Ordering : degrevlex
Names : k000, k001, k002, k003
|
Return number of polynomials in self.
EXAMPLE:
sage: sr = mq.SR(allow_zero_inversions=True,gf2=True,order='block')
sage: F,s = sr.polynomial_system()
sage: R0 = F.round(0)
sage: R0.ngens()
4
|
Return list of polynomials in self.
EXAMPLE:
sage: sr = mq.SR(allow_zero_inversions=True,gf2=True,order='block')
sage: F,s = sr.polynomial_system()
sage: R1 = F.round(1)
sage: l = R1.gens()
sage: l[0]
k000^2 + k000
|
Return unordered list of variables apprearing in polynomials
in self.
EXAMPLE:
sage: sr = mq.SR(allow_zero_inversions=True,gf2=True,order='block')
sage: F,s = sr.polynomial_system()
sage: R1 = F.round(1)
sage: sorted(R1.variables())
[k003, k002, k001, k000]
|
Return unordered list of monomials appearing in polynomials
in self.
EXAMPLE:
sage: sr = mq.SR(allow_zero_inversions=True,gf2=True,order='block')
sage: F,s = sr.polynomial_system()
sage: R1 = F.round(1)
sage: sorted(R1.monomials())
[k003, k002, k001, k000, k003^2, k002^2, k001^2, k000^2]
|
Substitute variables for every polynomial in self. See
MPolynomial.subs for calling convention.
INPUT:
args -- arguments to be passed to MPolynomial.subs
kwargs -- keyword arguments to be passed to MPolynomial.subs
EXAMPLE:
sage: sr = mq.SR(allow_zero_inversions=True,gf2=True,order='block')
sage: F,s = sr.polynomial_system()
sage: R1 = F.round(1)
sage: R1.subs(s) # the solution
sage: R1
[0, 0, 0, 0]
|
Return string representation of self.
EXAMPLE:
sage: P.<x,y,z> = PolynomialRing(GF(2),3)
sage: F = mq.MPolynomialRoundSystem(P,[x*y +1, z + 1])
sage: str(F) # indirect doctest
'[x*y + 1, z + 1]'
|
Return the i-th generator of self.
EXAMPLE:
sage: P.<x,y,z> = PolynomialRing(GF(2),3)
sage: F = mq.MPolynomialRoundSystem(P,[x*y +1, z + 1])
sage: F[0] # indirect doctest
x*y + 1
|
Addition is the union of generators.
INPUT:
right -- MPolynomialSystem, list or tuple
EXAMPLE:
sage: sr = mq.SR(allow_zero_inversions=True,gf2=True,order='block')
sage: F,s = sr.polynomial_system()
sage: R1 = F.round(1)
sage: len(R1 + F.round(2)) # indirect doctest
28
sage: len(R1 + list(F.round(2)))
28
|
Return True if element is in the list of generators for self.
EXAMPLE:
sage: sr = mq.SR(allow_zero_inversions=True,gf2=True,order='block')
sage: F,s = sr.polynomial_system()
sage: R1 = F.round(1)
sage: P = F.ring()
sage: f = P('k000^2 + k000')
sage: f in R1
True
sage: f+1 in R1
False
|
Return self.ngens().
EXAMPLE:
sage: P.<x,y,z> = PolynomialRing(GF(2),3)
sage: F = mq.MPolynomialRoundSystem(P,[x*y +1, z + 1])
sage: len(F)
2
|
Iterate over the generators of self.
EXAMPLE:
sage: P.<x,y,z> = PolynomialRing(GF(2),3)
sage: F = mq.MPolynomialRoundSystem(P,[x*y +1, z + 1])
sage: for f in F:
... print f
x*y + 1
z + 1
|
Return SINGULAR ideal representation of self.
EXAMPLE:
sage: sr = mq.SR(allow_zero_inversions=True,gf2=True,order='block')
sage: F,s = sr.polynomial_system()
sage: R1 = F.round(1)
sage: R1._singular_()
k000^2+k000,
k001^2+k001,
k002^2+k002,
k003^2+k003
|
Return MAGMA ideal representation of self.
EXAMPLE:
sage: sr = mq.SR(allow_zero_inversions=True,gf2=True)
sage: F,s = sr.polynomial_system()
sage: R1 = F.round(1)
sage: R1._magma_() # optional, requires MAGMA
Ideal of Polynomial ring of rank 20 over GF(2)
Graded Reverse Lexicographical Order
Variables: k100, k101, k102, k103, x100, x101, x102, x103, w100, w101, w102, w103, s000, s001, s002, s003, k000, k001, k002, k003
Basis:
[
k000^2 + k000,
k001^2 + k001,
k002^2 + k002,
k003^2 + k003
]
|
| Home | Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0beta1 on Thu Jul 17 04:23:38 2008 | http://epydoc.sourceforge.net |