aboutsummaryrefslogtreecommitdiff
path: root/libcmix
diff options
context:
space:
mode:
authorDennis Brentjes <d.brentjes@gmail.com>2016-11-03 14:10:59 +0100
committerDennis Brentjes <d.brentjes@gmail.com>2016-11-03 14:10:59 +0100
commit98d37116f1dc542010b2d65dcda71871eeca8c87 (patch)
treead3174972185d03dd31da64a3ed7d0617a4936f9 /libcmix
parent9531b6bea9fb29074c588a4e4e8838f6d9335a2b (diff)
downloadcmix-98d37116f1dc542010b2d65dcda71871eeca8c87.tar.gz
cmix-98d37116f1dc542010b2d65dcda71871eeca8c87.tar.bz2
cmix-98d37116f1dc542010b2d65dcda71871eeca8c87.zip
Fixed the permutation step and reduced some code duplication.
Diffstat (limited to 'libcmix')
-rw-r--r--libcmix/cmix.c2
1 files changed, 1 insertions, 1 deletions
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);