summaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorSchanzenbach, Martin <mschanzenbach@posteo.de>2020-04-18 19:46:44 +0200
committerSchanzenbach, Martin <mschanzenbach@posteo.de>2020-04-18 19:46:44 +0200
commitf00c18e631ce8bdaf80d20f236ef275c9cb99291 (patch)
tree7926acf614e631febcbd5c99243d9c00edd2fbc2 /src/util
parent91cccda131a12be139d50effe4657c6b24e36135 (diff)
simplify pow even more; add timestamp to revocation pow
Diffstat (limited to 'src/util')
-rw-r--r--src/util/crypto_pow.c39
1 files changed, 0 insertions, 39 deletions
diff --git a/src/util/crypto_pow.c b/src/util/crypto_pow.c
index 5e225f244..1ab4443d1 100644
--- a/src/util/crypto_pow.c
+++ b/src/util/crypto_pow.c
@@ -47,12 +47,6 @@ GNUNET_CRYPTO_pow_hash (const char *salt,
struct GNUNET_HashCode *result)
{
#ifdef LSD0001
- char twofish_iv[128 / 8]; // 128 bit IV
- char twofish_key[256 / 8]; // 256 bit Key
- char rbuf[buf_len];
- int rc;
- gcry_cipher_hd_t handle;
-
GNUNET_break (ARGON2_OK == argon2d_hash_raw (3, /* iterations */
1024, /* memory (1 MiB) */
1, /* threads */
@@ -60,39 +54,6 @@ GNUNET_CRYPTO_pow_hash (const char *salt,
buf_len,
salt,
strlen (salt),
- &twofish_key,
- sizeof (twofish_key)));
-
- GNUNET_CRYPTO_kdf (twofish_iv,
- sizeof (twofish_iv),
- "gnunet-proof-of-work-iv",
- strlen ("gnunet-proof-of-work-iv"),
- twofish_key,
- sizeof(twofish_key),
- salt,
- strlen (salt),
- NULL, 0);
- GNUNET_assert (0 ==
- gcry_cipher_open (&handle, GCRY_CIPHER_TWOFISH,
- GCRY_CIPHER_MODE_CFB, 0));
- rc = gcry_cipher_setkey (handle,
- twofish_key,
- sizeof(twofish_key));
- GNUNET_assert ((0 == rc) || ((char) rc == GPG_ERR_WEAK_KEY));
- rc = gcry_cipher_setiv (handle,
- twofish_iv,
- sizeof(twofish_iv));
- GNUNET_assert ((0 == rc) || ((char) rc == GPG_ERR_WEAK_KEY));
- GNUNET_assert (0 == gcry_cipher_encrypt (handle, &rbuf, buf_len, buf,
- buf_len));
- gcry_cipher_close (handle);
- GNUNET_break (ARGON2_OK == argon2d_hash_raw (3, /* iterations */
- 1024, /* memory (1 MiB) */
- 1, /* threads */
- rbuf,
- buf_len,
- salt,
- strlen (salt),
result,
sizeof (struct
GNUNET_HashCode)));