Discussions on Python software that powers the ChipWhisperer system
#1123 by brissettecj
Fri Feb 10, 2017 6:02 pm

I'm trying to get the "CWCapture.pyw" code to repeat the stock "CW305 Artix Target w/ ChipWhisperer-Lite" attack overnight for several different encryption keys read off of a text document. I then want to store each of these unique-key runs to a file. I am not sure how to best do this. The concept is simple and I know what commands to use in python. However, I don't have experience with large projects and I don't know where in the code the key is stored, or where I should loop the code. Is anyone here a master of the CWCapture code structure and could lead me in the right direction?

#1125 by aziesemer
Sat Feb 11, 2017 5:27 pm
Actually its easy to do it. You just need to create a new file, similar to:

It needs to extend AcqKeyTextPattern_Base and implement the relevant methods. Take a look at these links for more information:

Another possibility is to modify the example scripts to read and save the keys to/from a file.
#1126 by gdeon
Tue Feb 14, 2017 9:06 am
Hi Chris,

I think Adriel's second suggestion should be pretty easy to set up. Take one of the scripts from software/chipwhisperer/capture/scripts/ and modify it to read a set of encryption keys from a file. Then, get your script to load the target with one key, capture multiple traces, and save the project. Repeat until done. it might take a bit of playing around to make sure everything works (ie: so your script properly saves all the data where you want it to) but it shouldn't be too hard to get it running.
#1128 by brissettecj
Tue Feb 14, 2017 1:46 pm

I got it working actually. Oddly enough you suggested exactly what I did! However, it seems to be going super slow (I made a forum post about it) . It seems that there may be some sort of memory issue bogging it down? When I restart the application it runs at full speed, then the more traces it takes the more it slows down.
Any thoughts?

#1131 by brissettecj
Wed Feb 15, 2017 11:27 am
aziesemer wrote:Are you breaking the capture into multiple segments (with 50-100 traces each)?

I am not, do you think this would solve the memory issue I'm having? If so, how could I do that?
#1159 by gdeon
Fri Feb 24, 2017 11:34 am

I wanted to mention that I was trying some large captures today (total 50000 traces). I did this capture with "Number of Sets" at 50, so each segment of traces only had 1000 traces in it. I didn't notice any big slowdowns. I'd still like to fix this issue, but increasing the number of sets is a good workaround for now.
#1183 by brissettecj
Tue Mar 14, 2017 1:19 pm
Thank you very much! I will be sure to try this soon and let you know how it goes. Really appreciate it.

#1190 by brissettecj
Sun Mar 19, 2017 11:49 am
I tried separating it into more sets and I didn't see a significant change in speed. I did however strip the UI from my modified attack and it seems to capture at a constant rate now. For some reason the UI seems like it was causing the issues.


Who is online

Users browsing this forum: Google [Bot] and 2 guests