Using fork of mbed-tls AES implementation I've looked at a bit: https://github.com/newaetech/chipwhisperer/blob/develop/hardware/victims/firmware/crypto/mbedtls/library/aes.c
Important chunks:
One round of AES works like this with T-Tables:
# -*- coding: utf-8 -*- | |
import pypyodbc | |
#Example: Automatically populate library with real P/Ns from Digi-Key | |
#Open database file (NB: This worked with older .MDB file, haven't updated) | |
dbconn = pypyodbc.win_connect_mdb(r'newae_dblib\NewAElib_db.MDB') | |
cur = dbconn.cursor() |
sudo apt-get install python2.7 python2.7-dev python2.7-libs python-numpy python-scipy python-pyside python-configobj python-setuptools python-pip python-tk | |
sudo pip install pyusb | |
sudo pip install pyqtgraph | |
sudo pip install matplotlib | |
git clone https://github.com/newaetech/chipwhisperer.git | |
cd chipwhisperer | |
git checkout develop | |
cd software | |
python setup.py develop --user |
Using fork of mbed-tls AES implementation I've looked at a bit: https://github.com/newaetech/chipwhisperer/blob/develop/hardware/victims/firmware/crypto/mbedtls/library/aes.c
Important chunks:
One round of AES works like this with T-Tables:
# Encodes ioprox data to format used by proxmark, if using a version that doesn't allow you to specify | |
# the version/facility/cardnumber seperately. | |
id_str = "XSF(01)66:25342" | |
version = id_str.split('(')[1].split(')')[0] | |
facility = id_str.split('(')[1].split(')')[1].split(':')[0] | |
code = id_str.split(':')[1] | |
version = int(version, 16) #is this hex? Have only seen 1 or 2 here |
# Example of using PyFTDI to program CRAM on ICE40 FPGA. For example | |
# if you are using IceBreaker, you'd need to change jumpers to route | |
# SPI to the FPGA directly instead of the SPI flash. | |
import pyftdi | |
from pyftdi.spi import SpiController | |
import time | |
class ICE40_ftdi(object): |