0,
&key->HK,
hmac);
- if (0 == memcmp (hmac,
- &src->hmac,
- sizeof (*hmac)))
+ if (0 == GNUNET_memcmp (hmac,
+ &src->hmac))
{
valid_HK = &key->HK;
break;
(N != key->Kn) )
key = key->next;
if ( (NULL == key) ||
- (0 != memcmp (&key->HK,
- valid_HK,
- sizeof (*valid_HK))) )
+ (0 != GNUNET_memcmp (&key->HK,
+ valid_HK)) )
return -1;
/* Decrypt payload */
sizeof (struct GNUNET_CADET_AxHeader) + esize,
0, &ax->HKr,
&msg_hmac);
- if (0 != memcmp (&msg_hmac,
- &src->hmac,
- sizeof (msg_hmac)))
+ if (0 != GNUNET_memcmp (&msg_hmac,
+ &src->hmac))
{
static const char ctx[] = "axolotl ratchet";
struct GNUNET_CRYPTO_SymmetricSessionKey keys[3]; /* RKp, NHKp, CKp */
0,
&ax->NHKr,
&msg_hmac);
- if (0 != memcmp (&msg_hmac,
- &src->hmac,
- sizeof (msg_hmac)))
+ if (0 != GNUNET_memcmp (&msg_hmac,
+ &src->hmac))
{
/* Try the skipped keys, if that fails, we're out of luck. */
return try_old_ax_keys (ax,
GNUNET_break_op (0);
return GNUNET_SYSERR;
}
- if (0 == memcmp (&ax->DHRr,
- ratchet_key,
- sizeof (*ratchet_key)))
+ if (0 == GNUNET_memcmp (&ax->DHRr,
+ ratchet_key))
{
GNUNET_STATISTICS_update (stats,
"# Ratchet key already known",
GNUNET_CRYPTO_ecc_ecdh (e2,
&p1,
&hc2));
- GNUNET_break (0 == memcmp (&hc1,
- &hc2,
- sizeof (hc1)));
+ GNUNET_break (0 == GNUNET_memcmp (&hc1,
+ &hc2));
}
GNUNET_CRYPTO_eddsa_ecdh (e2,
&p1,
&hc2));
- GNUNET_break (0 == memcmp (&hc1,
- &hc2,
- sizeof (hc1)));
+ GNUNET_break (0 == GNUNET_memcmp (&hc1,
+ &hc2));
}
GNUNET_CRYPTO_hash (&ax_tmp.RK,
sizeof (ax_tmp.RK),
&kx_auth);
- if (0 != memcmp (&kx_auth,
- &msg->auth,
- sizeof (kx_auth)))
+ if (0 != GNUNET_memcmp (&kx_auth,
+ &msg->auth))
{
/* This KX_AUTH is not using the latest KX/KX_AUTH data
we transmitted to the sender, refuse it, try KX again. */
GNUNET_CRYPTO_ecdhe_key_get_public (&ax_tmp.kx_0,
&ephemeral_key);
- if (0 != memcmp (&ephemeral_key,
- &msg->r_ephemeral_key_XXX,
- sizeof (ephemeral_key)))
+ if (0 != GNUNET_memcmp (&ephemeral_key,
+ &msg->r_ephemeral_key_XXX))
{
LOG (GNUNET_ERROR_TYPE_WARNING,
"My ephemeral is %s!\n",