From 4e215db42af5060debe26979e3643f7ec921f9e4 Mon Sep 17 00:00:00 2001 From: Conor Patrick Date: Thu, 28 Feb 2019 23:13:12 -0500 Subject: [PATCH] start from 0 --- fido2/u2f.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fido2/u2f.c b/fido2/u2f.c index 1e94f56..0bcd9b7 100644 --- a/fido2/u2f.c +++ b/fido2/u2f.c @@ -225,7 +225,7 @@ static int16_t u2f_authenticate(struct u2f_authenticate_request * req, uint8_t c } count = ctap_atomic_count(0); - hash[0] = 0xff; + hash[0] = (count >> 24) & 0xff; hash[1] = (count >> 16) & 0xff; hash[2] = (count >> 8) & 0xff; hash[3] = (count >> 0) & 0xff; @@ -242,7 +242,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] = 0xff; + hash[0] = (count >> 24) & 0xff; hash[1] = (count >> 16) & 0xff; hash[2] = (count >> 8) & 0xff; hash[3] = (count >> 0) & 0xff;