Open-source aspects of GOST Cryptography
 help / color / mirror / Atom feed
* [oss-gost-crypto] [PATCH 1/3] Add GOST 28147-89 generic implementation
@ 2018-09-30  9:27 Wartan Hachaturow
  2018-09-30  9:44 ` Dmitry Eremin-Solenikov
  0 siblings, 1 reply; 2+ messages in thread
From: Wartan Hachaturow @ 2018-09-30  9:27 UTC (permalink / raw)
  To: oss-gost-crypto

[-- Attachment #1: Type: text/plain, Size: 196 bytes --]

Привет.

Посмотрите, вот магма для cryptoapi, прикладывается на текущий линусовый
HEAD.

P.S> Early draft :))

-- 
Вартан

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: [PATCH 1/3] Add GOST 28147-89 generic implementation --]
[-- Type: text/x-patch, Size: 1391 bytes --]

>From e98201d751a2865cdcca1fa484de0f855f3f8559 Mon Sep 17 00:00:00 2001
From: Wartan Hachaturow <wart@debian.org>
Date: Thu, 2 Nov 2017 13:31:24 +0300
Subject: [PATCH 1/3] Add GOST 28147-89 generic implementation

Defaults to TK26-Z sboxes for now.
---
 crypto/Kconfig  | 7 +++++++
 crypto/Makefile | 1 +
 2 files changed, 8 insertions(+)

diff --git a/crypto/Kconfig b/crypto/Kconfig
index 0a121f9ddf8e..401394253b28 100644
--- a/crypto/Kconfig
+++ b/crypto/Kconfig
@@ -1612,6 +1612,13 @@ config CRYPTO_TWOFISH_AVX_X86_64
 	  See also:
 	  <http://www.schneier.com/twofish.html>
 
+config CRYPTO_GOST28147
+	tristate "GOST28147-89 (Magma) cipher algorithm"
+	select CRYPTO_ALGAPI
+	help
+	  Russian GOST28147-89 (Magma) cipher alogrithm.
+	  See <http://www.tc26.ru/> for more information.
+
 comment "Compression"
 
 config CRYPTO_DEFLATE
diff --git a/crypto/Makefile b/crypto/Makefile
index d41f0331b085..d7e5dd0041ca 100644
--- a/crypto/Makefile
+++ b/crypto/Makefile
@@ -109,6 +109,7 @@ obj-$(CONFIG_CRYPTO_ANUBIS) += anubis.o
 obj-$(CONFIG_CRYPTO_SEED) += seed.o
 obj-$(CONFIG_CRYPTO_SALSA20) += salsa20_generic.o
 obj-$(CONFIG_CRYPTO_CHACHA20) += chacha20_generic.o
+obj-$(CONFIG_CRYPTO_GOST28147) += gost28147_generic.o
 obj-$(CONFIG_CRYPTO_POLY1305) += poly1305_generic.o
 obj-$(CONFIG_CRYPTO_DEFLATE) += deflate.o
 obj-$(CONFIG_CRYPTO_MICHAEL_MIC) += michael_mic.o
-- 
2.19.0.rc2


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [oss-gost-crypto] [PATCH 1/3] Add GOST 28147-89 generic implementation
  2018-09-30  9:27 [oss-gost-crypto] [PATCH 1/3] Add GOST 28147-89 generic implementation Wartan Hachaturow
@ 2018-09-30  9:44 ` Dmitry Eremin-Solenikov
  0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Eremin-Solenikov @ 2018-09-30  9:44 UTC (permalink / raw)
  To: Wartan Hachaturow; +Cc: oss-gost-crypto

Привет,

вс, 30 сент. 2018 г. в 12:27, Wartan Hachaturow <wartan.hachaturow@gmail.com>:
> Посмотрите, вот магма для cryptoapi, прикладывается на текущий линусовый
> HEAD.

Используй, пожалуйста, git-send-email. А то патчи не прокомментировать толком.

- Я бы регистрировал отдельные типы алгоритмов, по одному под каждый S-Box.
  Тогда set_key может сразу и ключ ставить, и нужный s-box выбрать.

- Если ты хочешь добавлять поддержку 34.11-94 и имитовставки из 28147-89,
  лучше EXPORT_SYMBOL'нуть функции, которые работают с crypto_gost28147_ctx
  (encrypt, decrypt, set_key, set_param), а не crypto_gost28147_set_key, которая
  не особо поможет.

- параметры тоже надо EXPORT_SYMBOL'нуть.

- упоминание AES в коментариях к функциям

- Kconfig надо дополнить упоминаниями RFC и ГОСТ'ов, ссылка на tc26
  будет не особо понятна.

Я бы вынес эти патчи в какой-нибудь репозиторий, чтобы можно было
работать совместно. Я создавал на github/gitlab организации GostCrypt
для своих патчей. Могу тебя туда добавить.


-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-09-30  9:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-30  9:27 [oss-gost-crypto] [PATCH 1/3] Add GOST 28147-89 generic implementation Wartan Hachaturow
2018-09-30  9:44 ` Dmitry Eremin-Solenikov

Open-source aspects of GOST Cryptography

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/oss-gost-crypto/0 oss-gost-crypto/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 oss-gost-crypto oss-gost-crypto/ http://lore.altlinux.org/oss-gost-crypto \
		oss-gost-crypto@lists.altlinux.org oss-gost-crypto@lists.altlinux.ru oss-gost-crypto@lists.altlinux.com
	public-inbox-index oss-gost-crypto

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.oss-gost-crypto


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git