Code Monkey home page Code Monkey logo

newaetech / chipwhisperer Goto Github PK

View Code? Open in Web Editor NEW
1.1K 61.0 278.0 524.25 MB

ChipWhisperer - the complete open-source toolchain for side-channel power analysis and glitching attacks

Home Page: http://chipwhisperer.com

License: Other

Shell 0.01% Verilog 2.68% Coq 0.01% C 76.83% C++ 0.05% Makefile 0.15% Python 19.34% Assembly 0.48% Tcl 0.01% Batchfile 0.01% Ruby 0.03% CSS 0.01% TeX 0.01% CMake 0.01% sed 0.01% M4 0.01% NASL 0.01% Pascal 0.02% PHP 0.36% SystemVerilog 0.02%
security side-channel chipwhisperer

chipwhisperer's People

Contributors

adamws avatar alex-dewar avatar arossnewae avatar aziesemer avatar bfroemel avatar coastalwhite avatar colinoflynn avatar d235j avatar dependabot[bot] avatar djshepherd avatar doegox avatar franzheubach avatar gregdeon avatar jmichelp avatar jpcrypt avatar jynik avatar mcsmonk avatar mickdermack avatar nasahlpa avatar nikitalita avatar obronchain avatar pyvirus avatar q3k avatar s-vaes avatar safarir avatar schneider42 avatar testpersonal avatar wallento avatar x8-999-github avatar xuyang-huang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

chipwhisperer's Issues

SW: Dropdown for default SimpleSerial values

Would be nice if some common defaults for key/init/input/go commands were built into ChipWhisperer for a few applications (encryption, authentication, glitch module, etc). Should leave a custom mode where everything is user-editable and this should be default to avoid breaking existing scripts.

No section "Trace Management"

Attempting to load a project that doesn't exist using the command line gives a cryptic error message about the Trace Management section. We should check if the file exists before trying to find this section.

https://wiki.newae.com/Tutorial_B1_Building_a_SimpleSerial_Project

Following the B1 tutorial (on my CW lite) I am running into problems.

I am not quite sure this if this is because of my (self built software or the default because it used to work about 6 month ago) but for https://wiki.newae.com/Tutorial_B1_Building_a_SimpleSerial_Project to
work I need to follow a few more steps (I think those are described in the glitch video)

Configure the clock to generated 7.37 MHz
Switch TX/RX in CW extra settings
Configure HS IN/OUT to be the clkgen
perform an additional DCM reset.

SW: Import traces from external captures

Forum thread

Right now, there's no way to import raw traces/plaintexts/ciphertexts/keys into the trace manager. It would be helpful if there was a way to take .npy files with this information and automatically generate a .cfg file to be used in the trace manager.

Capture: I/O Decoder trigger stays after switching Pro to Lite

When a CW-Pro is connected, the I/O Decoder trigger module appears in the settings. It sticks around after we plug in a CW-Lite instead, and the Lite doesn't understand these settings, causing all kinds of USB errors. This module should vanish when a Lite is connected.

Windows 10 - Installer should be signed

Problems on Windows 10 due to unsigned installer it seems. We have a signing key from driver install so presumably this is fixable without much effort besides figuring out how to sign the installer.

Glitch explorer doesn't sweep if trace fails

If a trace capture times out (no trigger or other reasons), the glitch explorer will add a line but it won't change the parameters. This is really confusing. I think the parameters should always change if a line is added to the glitch explorer - maybe no lines should be added if the trace fails.

Glitch Explorer serial response wait in Simpleserial timeout to short

I try to glitch a traget based on Simpleserial and always got empty responses in glitch monitor however terminal showed a lot of data coming back.

After adding a timeout for the serial read everything worked fine:

        if fmt.startswith("$GLITCH$"):
            try:
                databytes = int(fmt.replace("$GLITCH$",""))
            except ValueError:
                databytes = 64

-            self.newInputData.emit(self.ser.read(databytes))
+            self.newInputData.emit(self.ser.read(databytes, timeout=1000))
            return None

This is not optimal (now it always takes 1 second for the trace to finish, regardless if the output arrives earlier) but it solved my problem.

Better would be to start the response read based on the trigger since my target needs some time to arrive at the trigger output and glitch point (between 500-700 msec).

Cannot switch from CW1200 to CWLite, hard to modify CW1200 FW Settings

Currently the CW1200 and CWLite firmware is one object that gets switched depending if a CWLite or CW1200 is detected. This ends up being pretty clunkly and causes many bad things (TM), including trying to load the wrong firmware when switching tools.

Should have seperate objects, maybe seperate pull downs are thus required.

Glitch explorer is slow during large captures

The glitch explorer uses a QTableWidget to display all of the glitch results. This class is really slow (ex: see http://stackoverflow.com/questions/16801802/how-to-speed-up-qtablewidget) so it becomes incredibly slow after a few thousand traces. There should be some way to speed up this table.

Fix firmware file rebuild script

As suggested by Thomas Jarosch: you could make a "smart" rebuild logic: Cache the sha256sum of the input files in an extra file. If they sha256sum of a file changes, regenerate the output file and update the cache.

Git: Improve branching model

Currently, we do all of our work in "master", and we just tag a commit when we make a new release. It would be better to make a "develop" branch for our day-to-day development so that the master branch only includes the software releases.

modalSession has been exited prematurely

"modalSession has been exited prematurely - check for a re-entrant call to endModalSession" is a Mac specific bug when closing modal dialogs and the only fix is updating the Qt library.

NOTE: This bug was copied from old KNOWNISSUES.TXT which is being deleted. I'm not sure if this bug is still a problem.

SW: Can't program XMEGA/AVR without GUI

The XMEGA programmer GUI has some of the logic for programming the XMEGA targets, and it's impossible to make a programmer object without the GUI. It should be much easier to program an XMEGA from the command line.

Glitch explorer doesn't sweep

Even with captures succeeding and all int/float settings correct, the glitch explorer sometimes refuses to sweep. I'm not sure why this happens.

SW: PyCrypto dependency

The random vs. fixed t-test attack (chipwhisperer/software/chipwhisperer/capture/acq_patterns/crittest.py) uses an AES encryption to generate a list of "random" plaintexts. It uses PyCrypto to perform these encryption operations. However, we have AES implemented elsewhere in ChipWhisperer, so we should get rid of this dependency.

py2exe / Binary Distribution

Have long thought of making a distribution using something like py2exe. So far I haven't done a lot of research into that, as are other options & also can do similar for macos. This issue is to track suggestions/notes:

Initial notes:

  • Would be good to still be able to modify some underlying files possibly.
  • Can install drivers at same time?

Analyzer crashes on exit if the Capture tool GUI is executed before from script (Windows only)

Analyzer crashes on exit if the Capture tool GUI is executed before (Windows only). The capture window is being deleted twice, in the exec_ loop (because the deleteLater call) and when the QApplication leaves the scope (because the deleterLater call inside the makeApplication). Workaround was to insert an argument to disable this last call.

NOTE: This bug was copied from old KNOWNISSUES.TXT which is being deleted. I'm not sure if this bug is still a problem.

SW: Make easier to use API

TODO: Make improvements (probably as 'wrapper' first) to make API easier to use. Perhaps something like this usage:

import chipwhisperer as cw
from chipwhisperer import gui
from chipwhisperer.acq_controller import basic

project = cw.project('aes.cwp', writer=sql_writer, overwrite=True)

gui.show()

scope = cw.scope("cwlite")
scope.gain_db = 20
scope.trigger.mode = "rising"
scope.trigger.timeout = 2
scope.trigger.offset = 1250
scope.trigger.samples = 3000
scope.trigger.pretrigger = 500

scope.clkgen.freq = 7.37E6
scope.adcclk.src = "clkgen_x4"
scope.reset_clocks()

scope.trigger_pins.tio4 = True
scope.trigger_pins.mode = "OR"
scope.target_hsout = "clkgen"

#scope.glitchhp = False
#scope.glitchlp = False
#scope.target_power = False
#scope.glitch.source = "clkgen"
#scope.glitch.manual()

ac = basic(scope, target, project)
ac.test_capture(N=1)

gui.register(scope)
gui.register(target)
gui.register(ac)

ac.capture(N=1000000, segments=1)

print scope.adcclk.freq
print scope.adcclk.samplerate

SW: New global_mod module used for passing data between modules

There are several instances where data needs to be passed between modules, for example in capture logic to pass around references to the OpenADC or ChipWhisperer. Right now this is done with some insane levels of indirection.

There is now a module to place these in instead. Need to go through and update the system to use this module, and figure out what all should go into it.

Trace import impossible

Hi,

I'm trying to import DPAv3-style traces, but the trace manager keeps crashing when selecting an entry in the dropdown menu.

Traceback (most recent call last):
  File "/home/edermi/chipwhisperer/software/chipwhisperer/common/traces/TraceManagerImport.py", line 97, in traceTypeChanged
    self.tmanagerParams = newTT.getParamsClass(openMode=True)   
AttributeError: 'NoneType' object has no attribute 'getParamsClass'

I'm not able to import traces, the 'load cfg' button stays grey.

I'm using ubuntu 14.04 with dependencies installed from repo and latest ChipWhisperer archive from the ChipWhisperer homepage.

CWPro: Don't allow setting SAD pattern with downsampling on

When downsampling is enabled, the trace in CWCapture will not look like the trace seen by the ADC. If the SAD pattern is set using a downsampled trace, this pattern won't be useful for trigger, but it might be unclear why the trigger is not working.

The SAD reference should be locked when downsampling is enabled.

Can't add QColor and int

There's an issue with auto-incrementing colors - CWCapture appears to misunderstand how the current color was selected, so it struggles to autoincrement it. Need to figure out how to reproduce.

Python code in scripts folder gets run automatically

Any .py files in chipwhisperer/software/chipwhisperer/capture/scripts will get automatically run (ie: any code outside of functions or classes will be run automatically). This can cause ChipWhisperer to break pretty badly (can't connect to CW hardware, etc).

One way to reproduce is to put the code from Tutorial B11 into the scripts folder.

SW: Crash when programming AVR

Attempting to program an AVR device when none are plugged in causes CWCapture to crash. The XMEGA programmer is a bit less insane (displays a warning that programming failed) - the AVR should work like this too.

SW: some analyzer SAD/T-test partitions are broken

Some of the partition choices for SAD/t-test display are broken. RKey-1 and HD AES Last Round print some pretty cryptic errors after clicking "Display". These errors should be fixed, or at least be a bit more user-friendly

Download CW Firmware Button Errors

  1. Connect to CW-Lite/CW1200
  2. Open CW Firmware Preferences Window
  3. Disconnect & then Reconnect to CW
  4. Hit "Program FPGA"

Problem seems to be related to keeping wrong reference around, needs fixing.

CWPro: Save/load SAD pattern

Currently, it is impossible to save a SAD pattern to use later - when the ChipWhisperer is powered off, this fixed pattern is lost. It would be nice to be able to save patterns and load them later.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.