From: Loup Vaillant Date: Mon, 5 Jun 2017 21:25:59 +0000 (+0200) Subject: fixed stack smashing caused by mismatched copy pasta X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=9efcb2202db6dad44552a281da7d842ef324147e;p=Monocypher.git fixed stack smashing caused by mismatched copy pasta --- 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;