From 9efcb2202db6dad44552a281da7d842ef324147e Mon Sep 17 00:00:00 2001 From: Loup Vaillant Date: Mon, 5 Jun 2017 23:25:59 +0200 Subject: [PATCH] fixed stack smashing caused by mismatched copy pasta --- tests/ed25519-donna/ed25519-hash-custom.h | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/tests/ed25519-donna/ed25519-hash-custom.h b/tests/ed25519-donna/ed25519-hash-custom.h index 613ed53..8dc3771 100644 --- a/tests/ed25519-donna/ed25519-hash-custom.h +++ b/tests/ed25519-donna/ed25519-hash-custom.h @@ -1,18 +1,4 @@ - -// copied from monocypher -typedef struct { - uint8_t buf[128]; // input buffer - uint64_t hash[8]; // chained state - uint64_t input_size[2]; // total number of bytes - uint8_t c; // pointer for buf[] - uint8_t output_size; // digest size -} crypto_blake2b_ctx; - -void crypto_blake2b_init(crypto_blake2b_ctx *ctx); -void crypto_blake2b_update(crypto_blake2b_ctx *ctx, - const uint8_t *in, size_t in_size); -void crypto_blake2b_final(crypto_blake2b_ctx *ctx, uint8_t *out); -void crypto_blake2b(uint8_t out[64], const uint8_t *in, size_t in_size); +#include "monocypher.h" typedef struct { crypto_blake2b_ctx ctx; -- 2.47.3