TomN wrote:
It looks like you are using the "next" OTP as a key to encrypt the disk data. If so I don't know how you would be able to predicate what the OTP will be because of the 16-bit random data field and the time stamp which are both included in the OTP. Also, anything that will cycle power on the Yubikey (insert/remove) will advance the session counter which will change the OTP.
Yes, I think you are right, you can't predict the next otp with our technology, so you cannot use it for encryption. Also, the chances to lose an OTP are pretty high, I think.
To be able to use the yubikey for disk encryption purposes, if you don't want to use an online verification service (which can be problematic during boot), is to store the yubikey AES key on the machine somehow, and use that AES key to verify a yubikey OTP.
You could store the yubikey encrypted key in a PKCS#8 container, then to boot the machine you would need
1. to enter the password, to decrypt the PKCS#8 container, and
2. press the yubikey button the generate an OTP.
The software would verify the OTP against a local yubikey database. The security benefits over just passwords could be discussed, but it may provide a complication that makes it difficult for attackers to not bother.
/Simon