From: Schanzenbach, Martin Date: Sat, 18 Apr 2020 19:14:03 +0000 (+0200) Subject: towards more expirations X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=eb6b547e243144f27749811c15b6cce90e03aaa7;p=oweals%2Fgnunet.git towards more expirations --- 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),