Skip to content

WIP: MGM mode for magma/kuznyechik cipher. Initial implementation.#393

Open
igrkir wants to merge 4 commits into
gost-engine:masterfrom
igrkir:mgm
Open

WIP: MGM mode for magma/kuznyechik cipher. Initial implementation.#393
igrkir wants to merge 4 commits into
gost-engine:masterfrom
igrkir:mgm

Conversation

@igrkir

@igrkir igrkir commented Feb 28, 2022

Copy link
Copy Markdown

To make tests pass through we need to update OpenSSL's objects.txt file with new identifiers:

  • kuznyechik-mgm
  • magma-mgm

@igrkir

igrkir commented Feb 28, 2022

Copy link
Copy Markdown
Author

What is the best choice to add identifiers?
I can create additional directory to add script to apply this changes to OpenSSL. But it seems to me, that 'master' branch is bad place for it.

@igrkir

igrkir commented Feb 28, 2022

Copy link
Copy Markdown
Author

I have applied this changes on my local computer. And it seems that all built in tests is passed through.

@igrkir igrkir closed this Feb 28, 2022
@igrkir

igrkir commented Feb 28, 2022

Copy link
Copy Markdown
Author

This is my local changes to OpenSSL:

mgm.txt

@beldmit beldmit reopened this Mar 18, 2022
@beldmit

beldmit commented Mar 18, 2022

Copy link
Copy Markdown
Contributor

Sorry for the delay.

The big idea is

  • we don't add new NIDs to openssl upstream, it will be rejected with probability > 90%
  • we need supporting new ciphers only in providers because engine interface becomes deprecated
  • so we implement MGM only as a part of provider, not as a part of engine.

After that it becomes possible to add support of ciphersuites to openssl.

@igrkir

igrkir commented Mar 18, 2022

Copy link
Copy Markdown
Author

ok. thanks.
should MGM be available in "engine" part of source code (e.g. for internal use), or only in "provider" part through it's API?

@beldmit

beldmit commented Mar 18, 2022

Copy link
Copy Markdown
Contributor

In theory, you could dynamically register NIDs for them. In practice I don't see much sense, so let's leave it in provider part only.

@igrkir

igrkir commented Mar 18, 2022

Copy link
Copy Markdown
Author

so, no internal tests for engine, only for provider case?

@beldmit

beldmit commented Mar 18, 2022

Copy link
Copy Markdown
Contributor

yes. You should write the C test loading the provider, fetching an algorithm and performing test.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants