Package sage :: Package crypto :: Package mq :: Module mpolynomialsystemgenerator :: Class MPolynomialSystemGenerator
[hide private]
[frames] | no frames]

Class MPolynomialSystemGenerator

source code

                      object --+    
                               |    
structure.sage_object.SageObject --+
                                   |
                                  MPolynomialSystemGenerator
Known Subclasses:
sr.SR_generic


Abstract base class for generators of MPolynomialSystems.



Instance Methods [hide private]
 
__getattr__(self, attr) source code
 
varformatstr(self, name)
Return format string for a given name 'name' which is understood by print et al.
source code
 
varstrs(self, name, round)
Return a list of variable names given a name 'name' and and index 'round'.
source code
 
vars(self, name, round)
Return a list of variables given a name 'name' and and index 'round'.
source code
 
ring(self)
Return the ring in which the system is defined.
source code
 
block_order(self)
Return a block term ordering for the equation systems generated by self.
source code
 
__call__(self, P, K)
Encrypt plaintext P using the key K.
source code
 
sbox(self)
Return SBox object for self.
source code
 
polynomial_system(self, P=['4ti2-20061025', 'R-2.6.0', 'atlas-3.7.37', 'atlas-3.8.1', 'a..., K=['4ti2-20061025', 'R-2.6.0', 'atlas-3.7.37', 'atlas-3.8.1', 'a...)
Return a tuple F,s for plaintext P and key K where F is an MPolynomialSystem and s a dictionary which maps key variables to their solutions.
source code
 
random_element(self)
Return random element.
source code

Inherited from structure.sage_object.SageObject: __hash__, __new__, __repr__, _axiom_, _axiom_init_, _gap_, _gap_init_, _gp_, _gp_init_, _interface_, _interface_init_, _interface_is_cached_, _kash_, _kash_init_, _macaulay2_, _macaulay2_init_, _magma_, _magma_init_, _maple_, _maple_init_, _mathematica_, _mathematica_init_, _maxima_, _maxima_init_, _octave_, _octave_init_, _pari_, _pari_init_, _r_init_, _sage_, _singular_, _singular_init_, category, db, dump, dumps, plot, rename, reset_name, save, version

Inherited from object: __delattr__, __getattribute__, __init__, __reduce__, __reduce_ex__, __setattr__, __str__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

varformatstr(self, name)

source code 

Return format string for a given name 'name' which is
understood by print et al.

Such a format string is used to construct variable
names. Typically those format strings are somewhat like
'name%02d%02d' such that rounds and offset in a block can be
encoded.

INPUT:
    name -- string

varstrs(self, name, round)

source code 

Return a list of variable names given a name 'name' and and
index 'round'.

This function is typically used by self._vars.

INPUT:
    name -- string
    round -- integer index

vars(self, name, round)

source code 

Return a list of variables given a name 'name' and and
index 'round'.

INPUT:
    name -- string
    round -- integer index

__call__(self, P, K)
(Call operator)

source code 

Encrypt plaintext P using the key K.

INPUT:
    P -- plaintext (vector, list)
    K -- key (vector, list)

polynomial_system(self, P=['4ti2-20061025', 'R-2.6.0', 'atlas-3.7.37', 'atlas-3.8.1', 'a..., K=['4ti2-20061025', 'R-2.6.0', 'atlas-3.7.37', 'atlas-3.8.1', 'a...)

source code 

Return a tuple F,s for plaintext P and key K where F is an
MPolynomialSystem and s a dictionary which maps key variables
to their solutions.

INPUT:
    P -- plaintext (vector, list)
    K -- key (vector, list)

random_element(self)

source code 

Return random element. Usually this is a list of elements in
the base field of length 'blocksize'.