TRNG via libnitrokey?

I tried to implement TRNG access via libnitrokey but I am unable to find information about supported devices and required firmware versions for this to work?

*NK_get_random(const uint8_t len, struct GetRandom_t out);

Function documentation at NK_C_API.h is bit sparse compared to other ones.

Any example how to get this work with Nitrokey PRO2 or Storage would be appreciated!

The GET_RANDOM command is only available for the Nitrokey Pro with firmware version v0.14 or newer. These two unit tests are examples on how the API can be used: test_random, test_random_collect.

1 Like

Thanks. I was trying with Storage and your answer explains a lot. I will check that TRNG with PRO next.