]> git.codecow.com Git - Monocypher.git/commitdiff
fixed stack smashing caused by mismatched copy pasta
authorLoup Vaillant <loup@loup-vaillant.fr>
Mon, 5 Jun 2017 21:25:59 +0000 (23:25 +0200)
committerLoup Vaillant <loup@loup-vaillant.fr>
Mon, 5 Jun 2017 21:29:49 +0000 (23:29 +0200)
tests/ed25519-donna/ed25519-hash-custom.h

index 613ed53678a6c2dcb8568d4c4cf877c9849e6562..8dc3771cfa5e5b87bf304f509141ec3b4bb2d2b6 100644 (file)
@@ -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;