diff --git a/src/per_curve/eddsa.tmpl.c b/src/per_curve/eddsa.tmpl.c index d621bca..839b9bd 100644 --- a/src/per_curve/eddsa.tmpl.c +++ b/src/per_curve/eddsa.tmpl.c @@ -3,10 +3,10 @@ * @brief EdDSA routines. */ +#include "word.h" #include #include #include -#include "word.h" #include #define API_NAME "$(c_ns)" diff --git a/src/per_curve/eddsa.tmpl.hxx b/src/per_curve/eddsa.tmpl.hxx index e5382de..3d0e79d 100644 --- a/src/per_curve/eddsa.tmpl.hxx +++ b/src/per_curve/eddsa.tmpl.hxx @@ -70,7 +70,7 @@ private: } if (SUPPORTS_CONTEXTS) { - uint8_t dom[2] = {2, context_.size() }; + uint8_t dom[2] = {2, (uint8_t)context_.size() }; update(dom,2); update(context_); } diff --git a/src/shake.c b/src/shake.c index 84c5640..e33ed8d 100644 --- a/src/shake.c +++ b/src/shake.c @@ -270,7 +270,7 @@ size_t decaf_sponge_max_output_bytes ( ) { return (s->params->max_out == 0xFF) ? SIZE_MAX - : ((200-s->params->rate)/2); + : (size_t)((200-s->params->rate)/2); } DEFSHAKE(128)