From 98d37116f1dc542010b2d65dcda71871eeca8c87 Mon Sep 17 00:00:00 2001 From: Dennis Brentjes Date: Thu, 3 Nov 2016 14:10:59 +0100 Subject: Fixed the permutation step and reduced some code duplication. --- libcmix/cmix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libcmix') diff --git a/libcmix/cmix.c b/libcmix/cmix.c index 6a39767..4893c6c 100644 --- a/libcmix/cmix.c +++ b/libcmix/cmix.c @@ -184,7 +184,7 @@ enum cmix_error multiply_s(struct CMixContext const* ctx, char* r_out_buffer, ch GroupElement random_s; GroupElement message_s; - ctx->api.encrypt(&random_s, &message_s, ctx->s[index], ctx->network_key); + ctx->api.encrypt(&random_s, &message_s, ctx->s[ctx->permutation[index]], ctx->network_key); GroupElement random_pirs = ctx->api.multiply(random_r, random_s, true); GroupElement message_pirs = ctx->api.multiply(message_r, message_s, true); -- cgit v1.2.3-70-g09d2