It's possible to use the YubiKey NEO to generate random bytes of data using the RNG present on the YubiKey NEO:
Code:
echo "scd random 256" | gpg-connect-agent | sha256sum
The above works as a fairly decent hardware RNG, though I'm still waiting to hear back on how the RNG is implemented in the A700x chipset.
My first question is that the SCD RANDOM command's documentation says:
Quote:
S # RANDOM <nbytes>
S #
S # Get NBYTES of random from the card and send them back as data.
S # This usually involves EEPROM write on the card and thus excessive
S # use of this command may destroy the card.
S #
S # Note, that this function may be even be used on a locked card.
Will this function over time wear down the card?
My second question is this: will it always retrieve the amount of bytes that I request? If I request 1024 bytes of random data, will it block like /dev/random, giving me bytes until it has given a full 1024 bytes?