As of August 2020 the site you are on ( is deprecated, and content is now at


From ChipWhisperer Wiki
Revision as of 06:21, 12 July 2019 by Adewar (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The release of ChipWhisperer v5.0 has brought major changes to the front end of the ChipWhisperer software as well as a switch to Python 3: the GUI and the wiki tutorials have been replaced with Jupyter Notebooks, which allow users to run interactive Python blocks in their browser. The API is being updated and documented, with a push towards a stable and consistent interface. Most GUIless scripts for v4 should be compatible with the final release of v5, though users will be warned via the logging library about deprecated parts of the code base. Additional features, such as ChipWhipserer Analyzer support, are now available outside of any GUI.

What are Jupyter Notebooks?

Jupyter notebooks are documents that combine Python code, rich text, and additional code (such as Bash), organized into executable blocks. Notebooks allow users to run blocks out of order and multiple times, giving greater control over what's being run than a Python script. To run these notebooks, you'll need to install the Jupyter Notebook application (installation is covered in a later section), which also includes file browser and text editor capabilities.

Starting with ChipWhisperer 5, the GUI and Wiki tutorials have been replaced by notebooks. For users, this means that instead of clicking buttons and modifying values in a GUI, users now run and edit Python blocks that use ChipWhisperer's Python API. This has a number of advantages, including less complexity than a full GUI (hopefully fewer bugs), less separation between tutorials and running the software, and teaching users how to use ChipWhisperer's Python API.

Getting Started

Installing ChipWhisperer 5 and Jupyter

For instructions on how to install ChipWhisperer 5 and Jupyter, please see our page V5:Installing_ChipWhisperer.

Running Jupyter

Once you have ChipWhisperer/Jupyter installed and have the associated hardware, you should be all set to run ChipWhisperer 5! To run ChipWhisperer 5 via a Virtual Machine, open your VM and start the ChipWhisperer Jupyter image. Once the Virtual Machine is booted, open either Firefox or Chrome. Go to your address bar and type in localhost:8888. A page requesting a password should appear. Enter your password that you set for Jupyter during installation and you'll be taken to the Jupyter homescreen.

For a native installation, open a Bash-like shell terminal (for Windows users, Git Bash will work fine) and navigate to where you installed ChipWhisperer. In Bash, run $ jupyter notebook. You should be taken to the Jupyter homescreen.

Running Tutorials

Starting with ChipWhisperer v5.0, tutorials have been moved from the wiki into Jupyter Notebooks. Use Jupyter's file browser to navigate to software/Jupyter, which contains all of the tutorial notebooks. If you'd like to see our suggested completion order, you can open !!Suggested_Completion_Order!!.ipynb. Once you've decided which tutorial to run, open the tutorial via Jupyter.

Once you've got a notebook open, you'll find a combination of rich text and Python (and few special blocks, like the %%bash blocks. Near the top of the page, you'll find a special Python block with #Parameters in it. This block is used to select which scope (via SCOPETYPE) as well as which target (via PLATFORM) you'll be using for the tutorial. Make sure to edit these parameters for which hardware you're using. A list of common SCOPETYPE and PLATFORM values can be found here (not yet available).

Now that this setup is complete, you can start actually running through the tutorials. To run a block, click on the block and make sure it's highlighted (the block should have either a green or blue outline around it), then click the >| Run button on the toolbar at the top of the screen. This will run the code inside of the block and move to the next one. Run the rest of the code block in the tutorial (all tutorials are designed to be able to be run with minimal modifications to the Python code).

Special Blocks

While running tutorials, you will come across special blocks. For ChipWhisperer's notebooks, the two most common ones are %%bash and %run. The %%bash blocks run the following lines using the Bash-like shell you used to open Jupyter with and are typically used for building firmware. The %run blocks, on the other hand, are used to run other Jupyter notebooks. This avoids duplicating some common blocks across tutorials. To find these notebooks, follow the path specified after the %run command. For example, if you see a block with %run "Helper_Scripts/Setup.ipynb", you can find that file at software/Jupyter/Helper_Scripts/Setup.ipynb.

Editing Blocks

To edit code blocks, simple click on the text portion of the block and begin making your changes. You'll know if you're in edit mode for a block because it will be highlighted in green.


Documentation for ChipWhisperer's Python API can now be found on ReadTheDocs!

New Features

New features that are planned to be available in the final CW5 release include:

  • Analyzer and project support via the Python API
  • Python 3 support (no longer supports Python 2)
  • Tutorials via Jupyter Notebooks, which showcase how to use the Python API
  • New tutorials, including one submitted by a user via Github
  • Support for multiple ChipWhisperers via Python API
  • Simplified and standardized API
  • Improved capture speed
  • API documentation generated by Sphinx, available via ReadTheDocs
  • Automated tests for every tutorial
  • Contribution guide
  • Completed tutorials on Wiki
  • Lite GUI for plotting traces