コード例 #1
0
ファイル: _base.py プロジェクト: wuyasec/chipwhisperer
    def processTraces(self):
        progressBar = ProgressBar("Analysis in Progress",
                                  "Attacking with " + self.getName())
        with progressBar:
            self.attack.setModel(self.attackModel)
            self.attack.getStatistics().clear()
            self.attack.setReportingInterval(self.getReportingInterval())
            self.attack.setTargetSubkeys(self.getTargetSubkeys())
            self.attack.setStatsReadyCallback(self.sigAnalysisUpdated.emit)
            self.sigAnalysisStarted.emit()

            for itNum in range(self.getIterations()):
                startingTrace = self.getTracesPerAttack(
                ) * itNum + self.getTraceStart()
                endingTrace = startingTrace + self.getTracesPerAttack() - 1

                # TODO:support start/end point different per byte
                self.attack.addTraces(self.getTraceSource(),
                                      (startingTrace, endingTrace),
                                      progressBar,
                                      pointRange=self.getPointRange(None))

                if progressBar and progressBar.wasAborted():
                    return

        self.sigAnalysisDone.emit()
コード例 #2
0
    def processTraces(self):
        progressBar = ProgressBar("Analysis in Progress", "Attaking with CPA:")
        with progressBar:
            self.attack.setTargetBytes(self.targetBytes())
            self.attack.setReportingInterval(self.getReportingInterval())
            self.attack.getStatistics().clear()
            self.attack.setStatsReadyCallback(self.sigAnalysisUpdated.emit)

            self.sigAnalysisStarted.emit()
            for itNum in range(1, self.getIterations()+1):
                startingTrace = self.getTracesPerAttack() * (itNum - 1) + self.getTraceStart()
                endingTrace = startingTrace + self.getTracesPerAttack() - 1
                #TODO:  pointRange=self.TraceRangeList[1:17]
                self.attack.addTraces(self.getTraceSource(), (startingTrace, endingTrace), progressBar, pointRange=self.getPointRange())
                if progressBar and progressBar.wasAborted():
                    return

        self.sigAnalysisDone.emit()
コード例 #3
0
ファイル: cpa.py プロジェクト: phonchi/chipwhisperer
    def processTraces(self):
        progressBar = ProgressBar("Analysis in Progress", "Attaking with CPA:")
        with progressBar:
            self.attack.setTargetBytes(self.targetBytes())
            self.attack.setReportingInterval(self.getReportingInterval())
            self.attack.getStatistics().clear()
            self.attack.setStatsReadyCallback(self.sigAnalysisUpdated.emit)

            self.sigAnalysisStarted.emit()
            for itNum in range(1, self.getIterations()+1):
                startingTrace = self.getTracesPerAttack() * (itNum - 1) + self.getTraceStart()
                endingTrace = startingTrace + self.getTracesPerAttack() - 1
                #TODO:  pointRange=self.TraceRangeList[1:17]
                self.attack.addTraces(self.getTraceSource(), (startingTrace, endingTrace), progressBar, pointRange=self.getPointRange())
                if progressBar and progressBar.wasAborted():
                    return

        self.sigAnalysisDone.emit()
コード例 #4
0
    def processTraces(self):
        progressBar = ProgressBar("Analysis in Progress", "Attacking with " + self.getName())
        with progressBar:
            self.attack.setModel(self.attackModel)
            self.attack.getStatistics().clear()
            self.attack.setReportingInterval(self.getReportingInterval())
            self.attack.setTargetSubkeys(self.getTargetSubkeys())
            self.attack.setStatsReadyCallback(self.sigAnalysisUpdated.emit)
            self.sigAnalysisStarted.emit()

            for itNum in range(self.getIterations()):
                startingTrace = self.getTracesPerAttack() * itNum + self.getTraceStart()
                endingTrace = startingTrace + self.getTracesPerAttack() - 1

                # TODO:support start/end point different per byte
                self.attack.addTraces(self.getTraceSource(), (startingTrace, endingTrace), progressBar, pointRange=self.getPointRange(None))

                if progressBar and progressBar.wasAborted():
                    return

        self.sigAnalysisDone.emit()