I need some info/suggestions about the cryptographic algorithm that make me sure that the executed bios by the CPU is an authenticated bios. The check has to be performed by a FPGA.
I have SPI Flash that contains the bios code ( assembler code ), CPU and FPGA between CPU and SPI Flash.
The first idea was to authenticate the bios performing a HMAC authentication of the data stream between CPU and flash, but I saw that the stream is always different so impossible to authenticate ( the bios/CPU waits the wake up of the peripheral so perform each time different operations ).
The second idea is to encrypt the whole SPI flash and decrypt on fly with FPGA when the CPU request the data. I actually don't know if FPGA is enough fast to do this, but I'm sure I can't use an AES 128 because the FPGA isn't so fast to fetch 128 bit to decrypt only 32 bit ( during the bios execution there are a lot of memory jump and usually the fetched data are 32 bit for each CPU operation ).