Repository navigation
U2F Zero fails Google's u2f reference code tests #71
Copy link
Copy link
Open
Description
My U2F Zero (with the latest firmware: 21c4f0c) fails the google u2f tests: https://github.com/google/u2f-ref-code/tree/master/u2f-tests/HID. My yubikey u2f passes almost all of them.
HID Tests U2F Zero:
[vv:~/dev/u2f] master ± ./HIDTest 'IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/XHC1@14/XHC1@14000000/HS02@14200000/U2F Zero@14200000/U2F Zero@0/IOUSBHostHIDDevice@14200000,0'
PASS(test_Idle())
PASS(test_Init())
PASS(test_BasicInit())
PASS(test_Unknown(U2FHID_SYNC))
PASS(test_InitOnNonBroadcastEchoesCID())
PASS(test_InitUnderLock())
PASS(test_InitSelfAborts())
.PASS(test_InitOther())
PASS(test_OptionalWink())
PASS(test_Lock())
PASS(test_Echo())
CHECK_LE fail at test_LongEcho[148]:sent > .075: zsh: abort ./HIDTest
HID Tests Yubikey:
[vv:~/dev/u2f] master ± ./HIDTest 'IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/XHC1@14/XHC1@14000000/HS01@14100000/Security Key by Yubico@14100000/IOUSBHostInterface@0/IOUSBHostHIDDevice@14100000,0'
PASS(test_Idle())
PASS(test_Init())
PASS(test_BasicInit())
PASS(test_Unknown(U2FHID_SYNC))
PASS(test_InitOnNonBroadcastEchoesCID())
PASS(test_InitUnderLock())
PASS(test_InitSelfAborts())
PASS(test_InitOther())
PASS(test_OptionalWink())
PASS(test_Lock())
PASS(test_Echo())
PASS(test_LongEcho())
PASS(test_Timeout())
PASS(test_WrongSeq())
PASS(test_NotCont())
PASS(test_NotFirst())
PASS(test_Limits())
PASS(test_Busy())
PASS(test_Interleave())
PASS(test_LeadingZero())
PASS(test_Idle(2.0))
PASS(test_NothingOnChannel0())
PASS(test_OnlyInitOnBroadcast())
PASS(test_Descriptor())
U2F Tests U2F Zero:
[vv:~/dev/u2f] master ± ./U2FTest 'IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/XHC1@14/XHC1@14000000/HS02@14200000/U2F Zero@14200000/U2F Zero@0/IOUSBHostHIDDevice@14200000,0'
PASS(check_Compilation())
PASS(test_Version())
PASS(test_UnknownINS())
PASS(test_WrongLength_U2F_VERSION())
PASS(test_WrongLength_U2F_REGISTER())
PASS(test_BadCLA())
PASS(test_Enroll(0x6985))
Touch device and hit enter..
CHECK_EQ fail at test_Enroll[134]:expectedSW12 != U2Fob_apdu(device, 0, U2F_INS_REGISTER, U2F_AUTH_ENFORCE, 0, string(reinterpret_cast<char*>(®Req), sizeof(regReq)), &rsp): zsh: abort ./U2FTest
U2F Tests Yubikey:
[vv:~/dev/u2f] master ± ./U2FTest 'IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/XHC1@14/XHC1@14000000/HS01@14100000/Security Key by Yubico@14100000/IOUSBHostInterface@0/IOUSBHostHIDDevice@14100000,0'
PASS(check_Compilation())
PASS(test_Version())
PASS(test_UnknownINS())
PASS(test_WrongLength_U2F_VERSION())
PASS(test_WrongLength_U2F_REGISTER())
PASS(test_BadCLA())
PASS(test_Enroll(0x6985))
Touch device and hit enter..
PASS(test_Enroll(0x9000))
PASS(test_Sign(0x6985))
PASS(test_Sign(0x6985, true))
PASS(test_Sign(0x6a80))
PASS(test_Sign(0x6a80))
Touch device and hit enter..
PASS(test_Sign(0x6985, true))
PASS(ctr1 = test_Sign(0x9000))
PASS(test_Sign(0x6985))
Touch device and hit enter..
PASS(ctr2 = test_Sign(0x9000))
CHECK_EQ fail at test_Sign[235]:expectedSW12 != real: zsh: abort ./U2FTest
Metadata
Metadata
Assignees
Labels
No labels
Activity
conorpp commentedon Jan 12, 2018
Can you register your token here and post the technical information?
ygator commentedon Jan 12, 2018
HIDTest
Mine fails as well, but if you run with -a it passes most tests but:
CHECK_LE fail at test_LongEcho[148]:sent > .075: (continuing -a)
CHECK_GE fail at test_LongEcho[149]:received < .020: (continuing -a)
Looking into the tests it says
// Expected transfer times for 2ms bInterval.
// We do not want fobs to be too slow or too aggressive.
and it wants the time to be >=.020 and <=.075
My device: sent: 0.0966043, received: 0.0190652
So the send took longer than .075 and the receive was faster than .020
U2FTest
It fails a lot. I did not look into it much, but the program does core dump when it fails.
conorpp commentedon Jan 13, 2018
With latest firmware, U2FTest should pass. The LongEcho tests will fail since the MCU isn't fast enough. If you post your token information from registering with the U2F test website, I can tell the firmware version based on the public key.
vojnovski commentedon Jan 16, 2018
@conorpp, here's the technical data from https://demo.yubico.com/u2f?tab=register:
And from https://demo.yubico.com/u2f?tab=login:
Edit: Added technical info from the login page.
vojnovski commentedon Jan 20, 2018
Some further comments:
huskyachao commentedon Jan 4, 2019
Hi,it seems that I met with the same problem.Have you solve the problem?
The HID and U2F Test results are the same as yours. When I try to test it in the https://demo.yubico.com/u2f?tab=register, the LED on the key turns red , and the result of registration is "Register Failed!!" @vojnovski