diff --git a/speck.h b/speck.h index f0402f2..d92d455 100644 --- a/speck.h +++ b/speck.h @@ -19,4 +19,4 @@ int speck_ctr (unsigned char *out, const unsigned char *in, const unsigned char *n, speck_context_t ctx); -int speck_expand_key (const unsigned char *k, speck_context_t ctx); +int speck_expand_key (const unsigned char *k, speck_context_t *ctx); diff --git a/transform_speck.c b/transform_speck.c index cde6394..d411a41 100644 --- a/transform_speck.c +++ b/transform_speck.c @@ -173,7 +173,7 @@ static int setup_speck_key(transop_speck_t *priv, const uint8_t *key, ssize_t ke // FOR NOW: USE KEY ITSELF memcpy (key_mat_buf, key, ((key_size>32)?32:key_size) ); - speck_expand_key (key_mat_buf, priv->ctx); + speck_expand_key (key_mat_buf, &(priv->ctx)); traceEvent(TRACE_DEBUG, "Speck key setup completed\n"); return(0);