Implements AES128 on a Basys3 FPGA with Xilinx Vivado 2021.1.
This is how to encrypt data with the Basys3:
- Upload the bitstream to the Basys3.
- Press the reset button (U18).
- Press the start button (T18).
- The Basys3 is ready to accept a block. Send the 128-bit block to the Basys3 through a serial terminal like PuTTY.
- The Basys3 should echo the 128-bit block after it receives all 128 bits of the block.
- The Basys3 is ready to accept a key. Send the 128-bit key to the Basys3 through a serial terminal like PuTTY.
- The Basys3 should echo the 128-bit block after it receives all 128 bits of the key.
- The Basys3 should send out the ciphertext one line under the key that it just echoed.
- To encrypt again, go back to (2).
AES.v is the top-level module. AES.v is a finite state machine with states for receiving the block, receiving the key, encrypting the block, and transmitting the ciphertext. The module that receives the block and key is uart_receiver128.v; the module encrypts the block is AES_Core.v; and, the module that transmits the ciphertext is uart_transmitter.v.
These three modules are from FPGADude's (David J. Marion) project:
- uart_transmitter
- uart_receiver
- baud_rate_generator