struct GNUNET_CRYPTO_EcdsaPublicKey *pub)
{
BENCHMARK_START (ecdsa_key_get_public);
- GNUNET_TWEETNACL_scalarmult_le_ed25519_base (pub->q_y, priv->d);
+ GNUNET_TWEETNACL_scalarmult_gnunet_ecdsa (pub->q_y, priv->d);
BENCHMARK_END (ecdsa_key_get_public);
}
}
void
-GNUNET_TWEETNACL_scalarmult_le_ed25519_base (u8 *pk, const u8 *s)
+GNUNET_TWEETNACL_scalarmult_gnunet_ecdsa (u8 *pk, const u8 *s)
{
u8 d[64];
gf p[4];
// Treat s as little endian.
for (u32 i = 0; i < 32; i++)
d[i] = s[31 - i];
- d[0] &= 248;
- d[31] &= 127;
- d[31] |= 64;
+
+ // For GNUnet, we don't normalize d
scalarbase (p, d);
pack (pk, p);
const uint8_t *sk);
void
-GNUNET_TWEETNACL_scalarmult_le_ed25519_base (uint8_t *pk, const uint8_t *s);
+GNUNET_TWEETNACL_scalarmult_gnunet_ecdsa (uint8_t *pk, const uint8_t *s);
#endif