diff --git a/fido2/u2f.c b/fido2/u2f.c index 677e04a..690287e 100644 --- a/fido2/u2f.c +++ b/fido2/u2f.c @@ -247,7 +247,7 @@ static int16_t u2f_authenticate(struct u2f_authenticate_request * req, uint8_t c } count = ctap_atomic_count(0); - hash[0] = (count >> 24) & 0xff; + hash[0] = 0x7f; hash[1] = (count >> 16) & 0xff; hash[2] = (count >> 8) & 0xff; hash[3] = (count >> 0) & 0xff; @@ -264,7 +264,7 @@ static int16_t u2f_authenticate(struct u2f_authenticate_request * req, uint8_t c crypto_ecc256_sign(hash, 32, sig); u2f_response_writeback(&up,1); - hash[0] = (count >> 24) & 0xff; + hash[0] = 0x7f; hash[1] = (count >> 16) & 0xff; hash[2] = (count >> 8) & 0xff; hash[3] = (count >> 0) & 0xff; diff --git a/tools/ctap_test.py b/tools/ctap_test.py index 7511f80..1edbcdd 100755 --- a/tools/ctap_test.py +++ b/tools/ctap_test.py @@ -448,7 +448,7 @@ class Tester: if lastc: assert (auth.counter - lastc) < 10 lastc = auth.counter - if lastc > 0x100000: + if lastc > 0x80000000: print("WARNING: counter is unusually high: %04x" % lastc) assert 0