From f8071bfb8908b78e57b44c54806d91bfbd80320b Mon Sep 17 00:00:00 2001 From: Dmitry Belyavskiy Date: Thu, 21 Jun 2018 17:07:24 +0300 Subject: [PATCH] Some more iterations of key meshing. --- gost89.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/gost89.c b/gost89.c index 3974ab8..8b1ce06 100644 --- a/gost89.c +++ b/gost89.c @@ -695,14 +695,22 @@ int main(void) hexdump(stdout, "Initial key", buf, 32); acpkm_magma_key_meshing(&ctx); - magma_get_key(&ctx, buf); - hexdump(stdout, "Meshed key", buf, 32); + hexdump(stdout, "Meshed key - K2", buf, 32); if (memcmp(meshed_key, buf, 32)) { fprintf(stderr, "Magma meshing failed"); } + + acpkm_magma_key_meshing(&ctx); + magma_get_key(&ctx, buf); + hexdump(stdout, "Meshed key - K3", buf, 32); + + acpkm_magma_key_meshing(&ctx); + magma_get_key(&ctx, buf); + hexdump(stdout, "Meshed key - K4", buf, 32); + } #endif -- 2.39.5