Open-source aspects of GOST Cryptography
 help / color / mirror / Atom feed
From: Vitaly Chikunov <vt@altlinux.org>
To: Open-source aspects of GOST Cryptography
	<oss-gost-crypto@lists.altlinux.org>
Subject: Re: [oss-gost-crypto] "Об open-source реализациях хэш-функции ГОСТ Р 34.11-2012"
Date: Sun, 26 May 2019 00:32:02 +0300
Message-ID: <20190525213202.53cbwyxfjixrevcq@altlinux.org> (raw)
In-Reply-To: <20190525200312.ui3zb2oouaxabaau@altlinux.org>

On Sat, May 25, 2019 at 11:03:13PM +0300, Vitaly Chikunov wrote:
> On Sun, May 05, 2019 at 12:57:21AM +0300, Vitaly Chikunov wrote:
> > 
> > К слову, достаточно 64-х "\xff".
> > 
> >   libgcrypt (master)$ perl -E 'print "\xff" x 64'| openssl dgst -md_gost12_256 -r; perl -E 'print "\xff" x 64' | ./tests/gchash stribog256 -
> >   964a5ab60286f106288743e2fe1a422d160898ca1bd535e831aa500cfe34d7e8 *stdin
> >   6cad1fb10486524958e90756a6e72ab717d89842634004a0958582d256209818  -
> 
> Заодно тест на реализацию add512:
> 
>   ~/infotecs$ perl -E 'print "\xff" x 64' > ff
>   ~/infotecs$ xxd ff
>   00000000: ffff ffff ffff ffff ffff ffff ffff ffff  ................
>   00000010: ffff ffff ffff ffff ffff ffff ffff ffff  ................
>   00000020: ffff ffff ffff ffff ffff ffff ffff ffff  ................
>   00000030: ffff ffff ffff ffff ffff ffff ffff ffff  ................
> 
>   ~/infotecs$ ./vipnethashcalc-tool ff --hash-alg Gost12S256
>   Вычисленное значение хэш-функции: 6CAD1FB10486524958E90756A6E72AB717D89842634004A0958582D256209818
> 
> Значение хэша у ViPNet Hash Calculation Tool 5.2.1.1027 соответствует
> реализации с ошибкой.
> 
> ps. На всякий случай:
> 
>   ~/infotecs$ ./vipnethashcalc-tool ff --hash-alg Gost94
>   Вычисленное значение хэш-функции: 8505D4623B76E757B63A4F9ADFF2413BAB457560A6A41A7D0056B909CDDD3D6C

  ~/cryptopro/linux-amd64$ /opt/cprocsp/bin/amd64/cryptcp
  CryptCP 4.0 (c) "КРИПТО-ПРО", 2002-2018.
  Утилита командной строки для подписи и шифрования файлов.
  ...
   -hashAlg      задать алгоритм хэширования
   OID           OID алгоритма хэширования: 1.2.643.2.2.9 для ГОСТ Р 34.11-94
		 1.2.643.7.1.1.2.2 для ГОСТ Р 34.11-2012 256 bit
		 1.2.643.7.1.1.2.3 для ГОСТ Р 34.11-2012 512 bit
  ...

  ~/cryptopro/linux-amd64$ perl -E 'print "\xff" x 64' > ff

  ~/cryptopro/linux-amd64$ /opt/cprocsp/bin/amd64/cryptcp -hash -hashAlg 1.2.643.7.1.1.2.2 ff
  CryptCP 4.0 (c) "КРИПТО-ПРО", 2002-2018.
  Утилита командной строки для подписи и шифрования файлов.
  Папка './':
  ff... OK.
  [ErrorCode: 0x00000000]
  ~/cryptopro/linux-amd64$ xxd ff.hsh
  00000000: 964a 5ab6 0286 f106 2887 43e2 fe1a 422d  .JZ.....(.C...B-
  00000010: 1608 98ca 1bd5 35e8 31aa 500c fe34 d7e8  ......5.1.P..4..

Значение хэша соответствует реализации без ошибки.



  reply	other threads:[~2019-05-25 21:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-02 12:41 Vitaly Chikunov
2019-05-04 21:33 ` Dmitry Eremin-Solenikov
2019-05-04 21:57     ` Vitaly Chikunov
2019-05-25 20:03       ` Vitaly Chikunov
2019-05-25 21:32         ` Vitaly Chikunov [this message]
2020-01-13  5:07           ` Vitaly Chikunov
2020-01-13  5:55             ` Wartan Hachaturow
2020-01-13  8:22               ` [oss-gost-crypto] Streebog padding bug Ex: "Об open-source реализациях Vitaly Chikunov
2019-05-25 19:53   ` [oss-gost-crypto] "Об open-source реализациях хэш-функции ГОСТ Р 34.11-2012" Dmitry Eremin-Solenikov
2019-07-09 15:20     ` Vitaly Chikunov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190525213202.53cbwyxfjixrevcq@altlinux.org \
    --to=vt@altlinux.org \
    --cc=oss-gost-crypto@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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