RustCrypto / RustCrypto/block-ciphers

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

Open
#321 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help wanted
Dominant language
Rust
Stars
784
Forks
157
Avg merge
15h 24m
Merged PRs (30d)
9

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with RFC 8891 Appendix B and compare its subkey schedule with the existing GOST 28147-89 implementation in this repository. Trace how the available S-boxes and cipher variants are represented, then define separate Gost89 and Magma behavior with the requested S-box and ordering differences; done means both schedules are supported without changing existing behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cryptography
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.