summaryrefslogtreecommitdiff
path: root/cipher/gost-s-box.c
Commit message (Collapse)AuthorAgeFilesLines
* gost: add keymeshing support per RFC 4357Dmitry Baryshkov2020-03-201-11/+20
| | | | | | | | | | | | | | * cipher/gost-s-box.c (gost_sbox): define if keymeshing should be enabled or not. (main): output whether we should enable or disable keymeshing for a particular parameters set. -- RFC 4357 defines CryptoPro keymeshing that should be applied depending on selected S-BOX (param set). Declare if particular S-BOX should enable or disable CryptoPro KeyMeshing. Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
* gost: Rename tc26 s-box from A to Z.Dmitry Eremin-Solenikov2016-11-251-1/+1
| | | | | | | * cipher/gost-s-box.c (gost_sboxes): Rename TC26_A to TC26_Z as it is the name that ended up in all standards. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
* cipher/gost28147: Fix CryptoPro-B S-BOX.Dmitry Eremin-Solenikov2016-11-171-0/+1
| | | | | | | * cipher/gost-s-box.c: CryptoPro_B s-box missed one line, resulting in incorrect encryption/decryption using that s-box. Add missing data. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
* cipher/gost28147: generate optimized s-boxes from compact onesDmitry Eremin-Solenikov2014-06-281-0/+256
* 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 <dbaryshkov@gmail.com>