Librem Key an alternative for yubikey-luks?


#1

Hey community and Purism devs,

I appreciate your work in every aspect of having a reasonable secure computing device and partnering with Nitrokey was a very clever move in my opinion.
I’ve followed the git of heads and the blog posts from Kyle that having a usb-smartcard, like the Nitrokey Pro 2, improves the security in terms of having an untampered system. (verifying the signatures of /boot files)
With my current system, I’m using a Yubikey with yubikey-luks, which uses a combination of a secret generated on the Yubikey (HOTP based) and the password itself, the usecase differs a lot if you try to compare both methods (boot verification, second factor). But there’s also a project which sounds quite similar to yubikey-luks but I can’t verify if it works the same way because I don’t have a Nitrokey for now (but I’m planning to replace my notebook on january next year and to order the Librem Key addon with it)

My question now is: Is it possible to use the Nitrokey for the boot verification process AND configuring it as a second-factor similar to the usecase I’m already using via the Yubikey?
I’m very paranoid in terms of my notebook and see the password as a weak link (shoulder surfing you know…), but combined with a hardware key (which would be already there to verify /boot) it would counter this threat.


Introducing the Librem Key
#2

The Nitrokey FAQ describes how to test this:

https://www.nitrokey.com/documentation/applications#computer-login

Linux Login with PAM

You have two options: pam_p11 or Poldi.

Poldi 0.4.1 works flawlessly with Nitrokey for PAM authentication. Besides the installation of poldi (e.g. ‘sudo apt-get install libpam-poldi’ on Ubuntu) the following steps are needed to get it working.

Is anybody here able to test this on a Librem with a Nitrokey (Pro)?


#3

That’s not exactly what I want, but this would be a step forward.
What I want is to have it enabled on the luks level, that’s right at the start of the notebook, before decrypting the harddrive. The pam module would be later, nevertheless - thanks for the suggestion. The homepartition would be secured with this solution.


#4

We are working to make both features work with the Librem Key. Both working with LUKS to decrypt your disk if the Librem Key is inserted, and also optionally logging into your system (using the PAM integration referenced in this thread) if the Librem Key is inserted. We also want to optionally lock your desktop if you remove the Librem Key.

Today you should be able to follow the same steps as in the Nitrokey docs and have it all work, but we have a goal to make it all easier for people who don’t want to tinker with PAM.


#5

Is it possible to combine the decryption via the Librem Key with a PIN or password?


#6

When you use the GPG private keys that are on the device you have to first unlock them with a PIN.


#7

I don’t want to be superannoying, but I’ll try it via another way.
A quote from yubikey-luks:

This enables you to use the yubikey as 2FA for LUKS. The Password you enter is used as challenge for the yubikey

So this is my usecase now, I enter a pin, the computer sends that to the yubikey, the yubikey responds and voilá, luks encrypted partitions get decrypted.

It would be pretty nice to have both. The verification of the bootfiles to know, that nobody has tampered with my notebook AND to force the user to have the Librem Key plugged to ensure that the right person tries to input the password. (It’s still possible to steal the Librem Key AND the password, but it would be much harder for an attacker to do so)
A nice addon for this solution is, that even if you enter a compromised password, with the Librem Key unplugged, it still wouldn’t work.