aboutsummaryrefslogtreecommitdiffstats
path: root/libhashsum_init_keccak__.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2024-09-12 17:58:24 +0200
committerMattias Andrée <maandree@kth.se>2024-09-12 17:58:24 +0200
commit833db35626bc6a57a21529c31605540ce1337686 (patch)
treebe537e4b5ba5d7abf79d9cdb1b611ce58b18e80c /libhashsum_init_keccak__.c
parentAdd relative_performance (diff)
downloadlibhashsum-833db35626bc6a57a21529c31605540ce1337686.tar.gz
libhashsum-833db35626bc6a57a21529c31605540ce1337686.tar.bz2
libhashsum-833db35626bc6a57a21529c31605540ce1337686.tar.xz
Replace relative_performance with libhashsum_get_relative_performance
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--libhashsum_init_keccak__.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/libhashsum_init_keccak__.c b/libhashsum_init_keccak__.c
index 53a9e52..f9c8be1 100644
--- a/libhashsum_init_keccak__.c
+++ b/libhashsum_init_keccak__.c
@@ -140,25 +140,6 @@ destroy(struct libhashsum_hasher *this)
}
-static uint64_t
-estimate_performance(long int r, long int c)
-{
- uint64_t base = 22517998136852480ULL / (uint64_t)r;
- switch (r + c) {
- case 1600:
- return base / 368ULL;
- case 800:
- return base / 2042ULL;
- case 400:
- return base / 1858ULL;
- case 200:
- return base / 1747ULL;
- default:
- return 0;
- }
-}
-
-
int
libhashsum_init_keccak__(struct libhashsum_hasher *this, size_t hashbits, void *spec_, size_t squeezes, const char *suffix)
{
@@ -189,7 +170,6 @@ libhashsum_init_keccak__(struct libhashsum_hasher *this, size_t hashbits, void *
}
this->input_block_size = libkeccak_zerocopy_chunksize(&this->state.keccak.s);
- this->relative_performance = estimate_performance(spec->bitrate, spec->capacity);
this->process = &process;
this->finalise_const = &finalise_const;
this->finalise = &finalise;