
tt09-led-serial is a nibble-serial implementation of the LED block cipher, proposed in 2012 and defined in The LED Block Cipher by J. Guo et. al. The cipher encrypts a 64-bit block of plaintext with a 128-bit key into a 64-bit block of ciphertext. The nibble-serial implementation enables a very compact implementation as most of the datapath logic can be reused over each nibble. The downside is that such nibble-serial implementations have a much larger latency. The nibble-serial architecture shown below was presented and analyzed earlier in Differential Fault Intensity Analysis on PRESENT and LED Block Ciphers by N. F. Galathy et. al.

To further reduce the I/O pinout constraints, this design also serializes the data-input (64 bit plaintext and 128 bit key) as well as the data-output (64 bit ciphertext).
| Activity | Cycles |
|---|---|
| Load Plaintext | 64 |
| Load Key | 128 |
| Read Ciphertext | 64 |
| Encrypt | 2045 |
The module is controlled through the bits of the input word ui_in.
The serial data format is MSB to LSB. That is, given a block of plaintext 0x0123..., the bits would be shift in as in the bitstring 0b0000000100100011....
| Bit | Name | Function |
|---|---|---|
| 7-6 | unused | NA |
| 5 | start | Assert to start encryption |
| 4 | getct | Assert to shift out ciphertext bit |
| 3 | loadkey | Assert to shift in key bit |
| 2 | loadpt | Assert to shift in plaintext bit |
| 1 | keyi | Key input bit |
| 0 | datai | Plaintext input bit |
The results are generation on the output word uo_out.
| Bit | Name | Function |
|---|---|---|
| 7-2 | unused | NA |
| 1 | done | 1 indicates encryption complete |
| 0 | dataq | Ciphertext output bit |
This design forces the key bits to 0 upon loading, so that the effective key value of the cipher is always hardcoded to 00000000_00000000_00000000_00000000. This disables the use of the design as a cipher, yet it still demonstrates how a nibble-serial architecture can be designed.
This block could be tested with some integration on a Raspberry PI to control ui_in and uo_out. The typical sequence of operation is as follows.
Here are twotthree sample test vectors. Consult the testbench for additional test vectors.
| Plaintext | Key | Ciphertext |
|---|---|---|
| 0000000000000000 | 00000000000000000000000000000000 | 3decb2a0850cdba1 |
| 0123456789abcdef | 00000000000000000000000000000000 | da261393c73be9ce |
| 12153524c0895e81 | 00000000000000000000000000000000 | 29db5fe262572f4e |
You will need external hardware to use the block cipher.
| # | Input | Output | Bidirectional |
|---|---|---|---|
| 0 | ui_in[0] | uo_out[0] | |
| 1 | ui_in[1] | uo_out[1] | |
| 2 | ui_in[2] | uo_out[2] | |
| 3 | ui_in[3] | uo_out[3] | |
| 4 | ui_in[4] | uo_out[4] | |
| 5 | ui_in[5] | uo_out[5] | |
| 6 | ui_in[6] | uo_out[6] | |
| 7 | ui_in[7] | uo_out[7] |