6.1. FOBOS DUT Protocol

../_images/dut-protocol.png

Fig. 6.2 FOBOS DUT Protocol

FOBOS uses the simple protocol shown in Fig. 6.2. An instruction consists of an Opcode and a Destination. The Opcode describes in which type of storage should be used. A C indicates a FIFO, an 8 a 32-bit register. This is immediately followed by the Destination, i.e., the FIFO or register number. Each instruction is followed by a Parameter. In case of FIFO, the parameter contains the number of bytes of data following. In case of Register, it contains the data to be stored in the selected register. Table 6.1 shows the implemented Instructions and the purpose of the associated Parameters.

Table 6.1 FOBOS DUT Protocol Instructions

Opcode

Destination

Storage

Usage

Parameter

C

0

FIFO_0

PDI

length of data in bytes

C

1

FIFO_1

SDI

length of data in bytes

C

2

FIFO_2

AD (optional)

length of data in bytes

C

3

FIFO_3

Nonce (optional)

length of data in bytes

8

0

Register 0

cmd

Command

8

1

Register 1

outlen

length of output in bytes

8

2

Register 2

rndlen

length of random data in 32-bit words

8

3

Register 3

user bits

User definable bits

8

4

Register 4

seed0

Part of seed for RNG

8

5

Register 5

seed1

Part of seed for RNG

8

6

Register 6

seed2

Part of seed for RNG

8

7

Register 7

seed3

Part of seed for RNG

FIFOs 2 and 3, typically used for Associated Data (AD) and Nonce respectively, are optional as they are not used by all cryptographic functions. Additionally, the GMU LWC Hardware API for AEAD ciphers does not require these FIFOs as both, AD and Nonce, are part of the test vector transmitted to PDI.

The FOBOS DUT Protocol implements the following commands:

  1. Start the cryptographic operation.

  2. Generate rndlen 32-bit words of random data and put them into the RDI FIFO.

  3. Reset the Pseudo Random Number Generator (RNG). It will start generating pseudo random numbers again starting from its seed.

The RNG is seeded from the seed provided in registers 4-7. The default value of these registers is 0x01234567_01234567_01234567_01234567.

Fig. 6.3 shows an example of a test vector for a block cipher. First 128-bit (16 Bytes) of plaintext are send for FIFO-0, then 128-bit (16 Bytes) of key for FIFO-2, followed by the expected cyphertext length of 128-bit (16 Bytes) and the command to start encryption.

../_images/testvector.png

Fig. 6.3 FOBOS Block Cipher Test Vector