From the drduh guide:
> It is recommended to generate cryptographic keys and configure YubiKey from a secure operating system and using an ephemeral environment
From the drduh guide:
> It is recommended to generate cryptographic keys and configure YubiKey from a secure operating system and using an ephemeral environment
Update: new YKs with new firmware are apparently able to provide proofs that the keys were generated on hardware.
That specific best practice might not be the most important for most people to follow, compared to other things on the list, but it is definitively a good idea and has saved me before. Random number generators on embedded devices aren't always the best.
Also I'd strongly encourage generating encryption subkey in software (offline, air-gapped machine) and then copying it to Yubikeys. If you lose your Yubikey (or mistype 3 times the PIN) you wouldn't be able to decrypt your secret data.
We're taking the risk anyway because the benefits of having the private keys generated and stored entirely on the YK is entirely worth it.
We're also not primarily using the YK to encrypt messages. If continuing to decrypt shared messages in the future is critical, I'd personally look into HSMs which offers key-wrapped backup.