yubikey-full-disk-encryption icon indicating copy to clipboard operation
yubikey-full-disk-encryption copied to clipboard

Add support for yubikey-manager

Open NgoHuy opened this issue 1 year ago • 10 comments

Because yubikey-personalization is not under active development, I add support for yubikey-manager. It works fine on my machine for format, enroll and open. I did not test NFC because I do not have NFC machine. For hooks, I added ykman and od, it should work. README should be modified if this commit is approved.

NgoHuy avatar Dec 08 '23 03:12 NgoHuy

As discussed in the issue ykman isn't drop-in replacement for yubikey-personalization so this is incompatible change

Vincent43 avatar Dec 08 '23 13:12 Vincent43

My patch is compatible with previous version. You can use it with your old challenge. You should read my patch again.

NgoHuy avatar Dec 08 '23 13:12 NgoHuy

I added new commit to address those issue. Please test it

NgoHuy avatar Dec 09 '23 15:12 NgoHuy

There is problem on hooks, I will look at tomorrow. Python is dificult to add library.

NgoHuy avatar Dec 09 '23 16:12 NgoHuy

Yes yubikey-manager has a lot of python deps. Adding them to initramfs would be a challenge.

Vincent43 avatar Dec 09 '23 18:12 Vincent43

We have few options:

  • pack ykmanager as ELF binary, it would increase initramfs's size. I don't prefer this way.
  • write custom script to find deps and add it to initramfs, but it's hard to maintain because we're not sure deps change in the future and break our package. It needs to regenerate every time when yubikey-manager has been released. I will read otp code and find package it used, not all packages.

NgoHuy avatar Dec 10 '23 03:12 NgoHuy

I tested with pyinstaller successfully, but the initramfs's zise is around 50Mb if we find all python's libraries, we need some .so files. I have an idea, unpack pyinstaller's output and add those files which in plain text.

NgoHuy avatar Dec 11 '23 10:12 NgoHuy

I added new commit, please check it, it works with hooks on my machine.

NgoHuy avatar Dec 12 '23 09:12 NgoHuy

Can you please squash the commits that are iterative and update the git log to help review?

agherzan avatar Dec 13 '23 13:12 agherzan

I squashed commit, please review it.

NgoHuy avatar Dec 13 '23 14:12 NgoHuy