Example #1
0
 def initAnalysis(self):
     self.attack = CPA()
     self.attack.setAnalysisAlgorithm(CPAProgressive,chipwhisperer.analyzer.attacks.models.AES128_8bit,chipwhisperer.analyzer.attacks.models.AES128_8bit.LEAK_HW_SBOXOUT_FIRSTROUND)
     self.attack.setTraceStart(0)
     self.attack.setTracesPerAttack(50)
     self.attack.setIterations(1)
     self.attack.setReportingInterval(10)
     self.attack.setTargetSubkeys([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])
     self.attack.setTraceSource(self.traces)
     self.attack.setPointRange((0,3000))
 def initAnalysis(self):
     # Setup the CPA algorith
     self.attack = CPA()
     leakage_object = chipwhisperer.analyzer.attacks.models.AES128_8bit.AES128_8bit(
         chipwhisperer.analyzer.attacks.models.AES128_8bit.SBox_output)
     self.attack.setAnalysisAlgorithm(CPAProgressive, leakage_object)
     self.attack.setTracesPerAttack(50)
     self.attack.setIterations(1)
     self.attack.setReportingInterval(10)
     self.attack.setTargetSubkeys(
         [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])
     self.attack.setTraceSource(self.traces)
     self.attack.setPointRange((0, 2999))
 def initAnalysis(self):
     # Setup the CPA algorith
     self.attack = CPA()
     self.attack.setAnalysisAlgorithm(
         chipwhisperer.analyzer.attacks.cpa_algorithms.progressive.
         CPAProgressive, chipwhisperer.analyzer.attacks.models.DES.DES,
         chipwhisperer.analyzer.attacks.models.DES.DES.
         LEAK_HW_SBOXOUT_FIRSTROUND)
     self.attack.setTraceStart(0)
     self.attack.setTracesPerAttack(100)
     self.attack.setIterations(1)
     self.attack.setReportingInterval(10)
     self.attack.setTargetSubkeys([0, 1, 2, 3, 4, 5, 6, 7])
     self.attack.setTraceSource(self.traces)
     self.attack.setPointRange((0, 3499))
Example #4
0
 def initAnalysis(self):
     # Setup the CPA algorith
     self.attack = CPA()
     leakage_object = chipwhisperer.analyzer.attacks.models.DES.DES(
         chipwhisperer.analyzer.attacks.models.DES.SBox_output)
     self.attack.setAnalysisAlgorithm(
         chipwhisperer.analyzer.attacks.cpa_algorithms.progressive.
         CPAProgressive, leakage_object)
     self.attack.setTraceStart(0)
     self.attack.setTracesPerAttack(100)
     self.attack.setIterations(1)
     self.attack.setReportingInterval(10)
     self.attack.setTargetSubkeys([0, 1, 2, 3, 4, 5, 6, 7])
     self.attack.setTraceSource(self.traces)
     self.attack.setPointRange((0, 3499))
Example #5
0
import chipwhisperer as cw
from chipwhisperer.analyzer.attacks.cpa import CPA
from chipwhisperer.analyzer.attacks.cpa_algorithms.progressive import CPAProgressive
from chipwhisperer.analyzer.attacks.models.AES128_8bit import *
from chipwhisperer.analyzer.preprocessing.add_noise_random import AddNoiseRandom

traces = self.project.traceManager()

attack = CPA()
leak_model = AES128_8bit(InvSBox_output) # inv sbox works on T-Box Decryption as well
attack.setAnalysisAlgorithm(CPAProgressive, leak_model)
#attack.setTraceSource(traces)
attack.setTraceSource(self.ppmod[0])

attack.setTraceStart(0)
attack.setTracesPerAttack(-1)
attack.setIterations(1)
attack.setReportingInterval(10)
attack.setTargetSubkeys([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])
attack.setPointRange((48000,50400)) # attack last round which occurs 1st, for decryption

self.results_table.setAnalysisSource(attack)
self.correlation_plot.setAnalysisSource(attack)
self.output_plot.setAnalysisSource(attack)
self.pge_plot.setAnalysisSource(attack)
attack.processTraces()