From 164738a0292b3f32c7747099ad9cadace58e5eda Mon Sep 17 00:00:00 2001 From: Dmitry Eremin-Solenikov Date: Fri, 6 Jun 2014 22:48:29 +0400 Subject: cipher/gost28147: generate optimized s-boxes from compact ones * cipher/gost-s-box.c: New. Outputs optimized expanded representation of s-boxes (4x256) from compact 16x8 representation. * cipher/Makefile.am: Add gost-sb.h dependency to gost28147.lo * cipher/gost.h: Add sbox to the GOST28147_context structure. * cipher/gost28147.c (gost_setkey): Set default s-box to test s-box from GOST R 34.11 (this was the only one S-box before). * cipher/gost28147.c (gost_val): Use sbox from the context. Signed-off-by: Dmitry Eremin-Solenikov --- cipher/Makefile.am | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'cipher/Makefile.am') diff --git a/cipher/Makefile.am b/cipher/Makefile.am index 8a3bd194..c1653566 100644 --- a/cipher/Makefile.am +++ b/cipher/Makefile.am @@ -93,6 +93,11 @@ rfc2268.c \ camellia.c camellia.h camellia-glue.c camellia-aesni-avx-amd64.S \ camellia-aesni-avx2-amd64.S camellia-arm.S +noinst_PROGRAMS = gost-s-box +gost28147.lo: gost-sb.h +gost-sb.h: gost-s-box + $(builddir)/gost-s-box $@ + if ENABLE_O_FLAG_MUNGING o_flag_munging = sed -e 's/-O\([2-9s][2-9s]*\)/-O1/' -e 's/-Ofast/-O1/g' else -- cgit v1.2.1