Python code for YubiHSM