#5586: [with patch, needs review] faster & more convenient sr
---------------------------------+------------------------------------------
Reporter: malb | Owner: malb
Type: enhancement | Status: new
Priority: major | Milestone: sage-3.4.1
Component: commutative algebra | Keywords: crypto, aes
---------------------------------+------------------------------------------
Description changed by malb:
Old description:
> '''Before''':
> {{{
> sage: sr =
> mq.SR(4,4,4,8,gf2=True,polybori=True,allow_zero_inversions=True)
> sage: %time F,s = sr.polynomial_system()
> CPU times: user 23.46 s, sys: 0.07 s, total: 23.52 s
> Wall time: 23.61 s
> }}}
>
> '''After''':
> {{{
> sage: sr =
> mq.SR(4,4,4,8,gf2=True,polybori=True,allow_zero_inversions=True)
> sage: %time F,s = sr.polynomial_system()
> CPU times: user 3.58 s, sys: 0.04 s, total: 3.62 s
> Wall time: 3.63 s
> sage: %time F,s = sr.polynomial_system()
> CPU times: user 2.05 s, sys: 0.00 s, total: 2.05 s
> Wall time: 2.05 s
> }}}
New description:
'''Before''':
{{{
sage: sr =
mq.SR(4,4,4,8,gf2=True,polybori=True,allow_zero_inversions=True)
sage: %time F,s = sr.polynomial_system()
CPU times: user 23.46 s, sys: 0.07 s, total: 23.52 s
Wall time: 23.61 s
}}}
'''After''':
{{{
sage: sr =
mq.SR(4,4,4,8,gf2=True,polybori=True,allow_zero_inversions=True)
sage: %time F,s = sr.polynomial_system()
CPU times: user 3.58 s, sys: 0.04 s, total: 3.62 s
Wall time: 3.63 s
sage: %time F,s = sr.polynomial_system()
CPU times: user 2.05 s, sys: 0.00 s, total: 2.05 s
Wall time: 2.05 s
}}}
Also, this now works:
{{{
sage: sr = mq.SR(1, 1, 1, 4, gf2=True, polybori=True)
sage: R = sr.R
sage: vn = sr.varstrs("P",0,1,4) + R.variable_names() +
sr.varstrs("C",0,1,4)
sage: R = BooleanPolynomialRing(len(vn),vn)
sage: sr.R = R
sage: C = sr.vars("C",0); C
(C000, C001, C002, C003)
sage: P = sr.vars("P",0)
sage: F,s = sr.polynomial_system(P=P,C=C)
sage: F
Polynomial System with 36 Polynomials in 28 Variables
sage: F.round(0)
(P000 + w100 + k000, P001 + w101 + k001, P002 + w102 + k002, P003 + w103 +
k003)
sage: F.round(-2)
(k100 + x100 + x102 + x103 + C000, k101 + x100 + x101 + x103 + C001 + 1,
...)
}}}
--
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5586#comment:2>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---