tillitis / qemu

Fork of https://gitlab.com/qemu-project/qemu
Other
7 stars 3 forks source link

Implement TRNG #1

Closed mchack-work closed 2 years ago

mchack-work commented 2 years ago

Implement the random number generator in the qemu model.

According to software.md there is:

mta1_mkdf_mem.h also says MTA1_MKDF_MMIO_TRNG_STATUS_READY_BIT = 0,.

Do we need real random data in the model? If so, do we just read from the host's random pool? If not, would, say returning 4 (number from a throw with fair dice) each time be OK?

In the software.md the firmware protocol includes CMD_TRNG_DATA and _STATUS. Do we really need those? I don't think so. If we want to get at the TRNG we can just write an app, right? I suggest we remove these from the document

quite commented 2 years ago

Yes, I will def remove TRNG CMDs from FW. That's up to app for now.

quite commented 2 years ago

Se also https://github.com/tillitis/tillitis-key1/pull/17

mchack-work commented 2 years ago

Merged in qemu and tillitis-key1.