ChipWhisperer
What will this section cover?
- Installing the ChipWhisperer Python Library for different Operating Systems
- Verifying that the installation was successful
The ChipWhisperer framework has a Python library to interact with its devices. This library is definitely a necessity if you plan on doing your own traces.
Installing the dependencies
The ChipWhisperer python library has some dependencies. Mainly, these dependencies are libusb and make. Let us go over the different operating systems and what needs to be done there.
Note: If something here is not working correctly or not up to date. Refer back to the original ChipWhisperer documentation that can be found here.
Windows
For Windows, we mainly need to install make. There are multiple ways to do
this. I suggest installing MinGW and
adding MinGW\msys\1.0\bin
to your PATH
environment variable.
macOS
For macOS, make should already be installed. To install libusb, we can use Homebrew.
brew install libusb
GNU/Linux
For Debian based systems, including Ubuntu, we can install both make and libusb using the following command.
sudo apt install libusb-dev make
For ArchLinux based systems, including Manjaro, we can install both make and libusb using the following command.
sudo pacman -S libusb make
Installing the python library
To install the ChipWhisperer library, we can use pip. We install it with the following command.
pip install chipwhisperer
Linux udev rules
When we are going to start doing traces, one might run into a missing
permissions error on Linux. This has to do with the udev
rules. How to solve
this, refer to the ChipWhisperer
docs.
This should solve having to run everything with sudo
, which is not preferred.
Verifying installation
To verify that the installation succeeded, we can start Python in interactive
mode using the python3
shell command. Then we should see something such as the
following.
Type "help", "copyright", "credits" or "license" for more information.
>>>
We can use the following Python code to attempt to import the ChipWhisperer python library.
import chipwhisperer
If there aren't any error messages, we have successfully installed the ChipWhisperer python library!
We have now correctly installed everything necessary to perform our own power measurements using ChipWhisperer boards. Furthermore, we have also verified our installation.