def updateScript(self, _=None): AttackBaseClass.updateScript(self) self.importsAppend("from chipwhisperer.analyzer.attacks.profiling import Profiling") analysAlgoStr = sys.modules[self._analysisAlgorithm.__class__.__module__].__name__ + '.' + self._analysisAlgorithm.__class__.__name__ model_path = sys.modules[self.findParam('Crypto Algorithm').getValue().__class__.__module__].__name__ cryptoalg = model_path + '.' + self.findParam('Crypto Algorithm').getValue().__class__.__name__ hwmodel = model_path + '.' + self.findParam('Crypto Algorithm').getValue().getHwModel().__name__ self.addVariable("init", "leakage_object", "%s(%s)" % (cryptoalg, hwmodel)) self.addFunction("init", "setAnalysisAlgorithm", "%s,leakage_object" % (analysAlgoStr), loc=1)
def updateScript(self, _=None): AttackBaseClass.updateScript(self) self.importsAppend( "from chipwhisperer.analyzer.attacks.profiling import Profiling") analysAlgoStr = sys.modules[ self._analysisAlgorithm.__class__. __module__].__name__ + '.' + self._analysisAlgorithm.__class__.__name__ model_path = sys.modules[self.findParam( 'Crypto Algorithm').getValue().__class__.__module__].__name__ cryptoalg = model_path + '.' + self.findParam( 'Crypto Algorithm').getValue().__class__.__name__ hwmodel = model_path + '.' + self.findParam( 'Crypto Algorithm').getValue().getHwModel().__name__ self.addVariable("init", "leakage_object", "%s(%s)" % (cryptoalg, hwmodel)) self.addFunction("init", "setAnalysisAlgorithm", "%s,leakage_object" % (analysAlgoStr), loc=1)
def updateScript(self, _=None): AttackBaseClass.updateScript(self) self.importsAppend("from chipwhisperer.analyzer.attacks.profiling import Profiling") analysAlgoStr = sys.modules[self._analysisAlgorithm.__class__.__module__].__name__ + '.' + self._analysisAlgorithm.__class__.__name__ self.addFunction("init", "setAnalysisAlgorithm", "%s" % analysAlgoStr, loc=0)