Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

magma: provide a way to support both gost28147 and magma subkeys order #321

Open
lumag opened this issue Jul 27, 2022 · 1 comment
Open

Comments

@lumag
Copy link
Contributor

lumag commented Jul 27, 2022

GOST 28147-89 and GOST R 34.12-2015 ended up using different subkeys schedule during encryption. For the non-formal description see the RFC. Please provide a way to support both of them. From my experience the easies (and most probably the most correct) way to achieve this is to specify Gost89 ciphers (original subkeys order) using all defined SBox-es (including the TC26-A one) and to specify a separate (Magma) cipher fixed to use TC26-A S-Box and using "new" subkeys order.

@newpavlov
Copy link
Member

The linked RFC describes the GOST R 34.12-2015 version. The test vectors from it are used in the doc example. Can you link test vectors for the older version? IIRC the original GOST does not contain them. The only thing which comes to mind is the KExp15 and KImp15 functions which (for some very weird reason) use the older version of the cipher.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants