That's very cool. Could you elaborate on the method in which the key accepts the challenge? I was under the impression that a Yubikey only acted as a USB keyboard - which ensured it's security by isolation.
https://developers.yubico.com/U2F/
Yubico has some python code here:
https://github.com/Yubico/python-u2flib-host
https://github.com/Yubico/python-u2flib-server
Chrome builds U2F into the browser itself for website authentication.
Another choice that looks (sadly, for me) more popular: https://github.com/ashtuchkin/u2f
[1] describes the flow at a high level, and [2] goes into more details
[1]: https://www.yubico.com/about/background/fido/
[2]: https://developers.yubico.com/U2F/Protocol_details/Overview....