From eb6b547e243144f27749811c15b6cce90e03aaa7 Mon Sep 17 00:00:00 2001 From: "Schanzenbach, Martin" Date: Sat, 18 Apr 2020 21:14:03 +0200 Subject: towards more expirations --- src/revocation/revocation.h | 8 ++++---- src/revocation/revocation_api.c | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'src/revocation') diff --git a/src/revocation/revocation.h b/src/revocation/revocation.h index 184f58e0a..d7b9cc139 100644 --- a/src/revocation/revocation.h +++ b/src/revocation/revocation.h @@ -89,14 +89,14 @@ struct RevokeMessage uint32_t reserved GNUNET_PACKED; /** - * Timestamp + * Number that causes a hash collision with the @e public_key. */ - struct GNUNET_TIME_AbsoluteNBO ts; + uint64_t proof_of_work GNUNET_PACKED; /** - * Number that causes a hash collision with the @e public_key. + * Timestamp */ - uint64_t proof_of_work GNUNET_PACKED; + struct GNUNET_TIME_AbsoluteNBO ts; /** * Signature confirming revocation. diff --git a/src/revocation/revocation_api.c b/src/revocation/revocation_api.c index c2aafd254..c9bb2543a 100644 --- a/src/revocation/revocation_api.c +++ b/src/revocation/revocation_api.c @@ -368,13 +368,13 @@ GNUNET_REVOCATION_check_pow (const struct GNUNET_CRYPTO_EcdsaPublicKey *key, ts_nbo = GNUNET_TIME_absolute_hton (*ts); - GNUNET_memcpy (buf, &pow, sizeof(pow)) ; - GNUNET_memcpy (&buf[sizeof(pow)], key, - sizeof(struct GNUNET_CRYPTO_EcdsaPublicKey)); - GNUNET_memcpy (&buf[sizeof(pow) + sizeof (struct GNUNET_TIME_AbsoluteNBO)], + GNUNET_memcpy (buf, &pow, sizeof(pow)); + GNUNET_memcpy (&buf[sizeof(pow)], &ts_nbo, sizeof (struct GNUNET_TIME_AbsoluteNBO)); - + GNUNET_memcpy (&buf[sizeof(pow) + sizeof (struct GNUNET_TIME_AbsoluteNBO)], + key, + sizeof(struct GNUNET_CRYPTO_EcdsaPublicKey)); GNUNET_CRYPTO_pow_hash ("gnunet-revocation-proof-of-work", buf, sizeof(buf), -- cgit v1.2.3