key_estimator
index
/home/guilley/dpacontest/code/reference/key_estimator.py

key_estimator.py provides some methods to evaluate the correctness
# of a key used to encipher some clear text with the Data Encryption
# Standard, according to the provided side-channel traces.
# Copyright (C) 2008 Florent Flament (florent.flament@telecom-paristech.fr)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 3 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

 
Modules
       
des_block
traces_database

 
Classes
       
key_estimator

 
class key_estimator
    Provides methods to give a mark to the key relatively to the probability of
the correctness of the key.
 
  Methods defined here:
__init__(self, sbox, key)
Initialize the key estimator.
sbox is a number between 0 and 7 (included)
key is a number between 0 and 63 (included)
get_differential(self)
Returns the differential trace accumulated since now
get_mark(self)
Return the mark of the key.
Just the max of the differential trace.
process(self, msg, trace)
Accumulate the given trace according to the given message (msg)

 
Functions
       
test()

 
Data
        __BIT__ = 0
__TABLE__ = 'secmatv1_2006_04_0809'