Kinda seems to work

This commit is contained in:
Jeff Burdges 2016-08-11 22:18:04 +02:00
parent 1f39f7e92b
commit 3115c6acc6

View File

@ -183,7 +183,7 @@ TALER_setup_fresh_coin (const struct TALER_TransferSecretP *secret_seed,
struct TALER_FreshCoinP *fc)
{
uint32_t be_salt = htonl (coin_num_salt);
unsigned char *p;
uint8_t *p;
GNUNET_assert (GNUNET_OK ==
GNUNET_CRYPTO_kdf (fc,
@ -199,7 +199,7 @@ TALER_setup_fresh_coin (const struct TALER_TransferSecretP *secret_seed,
/* Taken from like 170-172 of libgcrypt/cipher/ecc.c
* We note that libgcrypt stores the private key in the reverse order
* from many Ed25519 implementatons. */
p = (char *) fc->coin_priv; /*->key->bits; */
p = (uint8_t *) &(fc->coin_priv);
p[0] &= 0x7f; /* Clear bit 255. */
p[0] |= 0x40; /* Set bit 254. */
p[31] &= 0xf8; /* Clear bits 2..0 so that d mod 8 == 0 */