From: Sergey Matveev Date: Mon, 22 Apr 2024 14:25:30 +0000 (+0300) Subject: Download link for 5.14.1 release X-Git-Url: http://www.git.cypherpunks.ru/?p=gogost.git;a=commitdiff_plain;h=HEAD;hp=a6893968da7250cfe498e6adbed7427f4c5baf03 Download link for 5.14.1 release --- diff --git a/download.texi b/download.texi index 9bb2b9b..b51ae27 100644 --- a/download.texi +++ b/download.texi @@ -1,6 +1,12 @@ @multitable {XXXXX} {XXXX-XX-XX} {XXXX KiB} {meta4 tar pgp ssh} @headitem Version @tab Date @tab Size @tab Tarball +@item @ref{Release 5.14.1, 5.14.1} @tab 2024-04-22 @tab 67 KiB @tab +@url{gogost-5.14.1.tar.zst.meta4, meta4} +@url{gogost-5.14.1.tar.zst, tar} +@url{gogost-5.14.1.tar.zst.asc, pgp} +@url{gogost-5.14.1.tar.zst.sig, ssh} + @item @ref{Release 5.14.0, 5.14.0} @tab 2023-12-08 @tab 66 KiB @tab @url{gogost-5.14.0.tar.zst.meta4, meta4} @url{gogost-5.14.0.tar.zst, tar} diff --git a/gogost.go b/gogost.go index b7d04d9..f33164b 100644 --- a/gogost.go +++ b/gogost.go @@ -1,4 +1,4 @@ // Pure Go GOST cryptographic functions library. package gogost -const Version = "5.13.0" +const Version = "5.14.1" diff --git a/gost34112012512/pbkdf2_test.go b/gost34112012512/pbkdf2_test.go new file mode 100644 index 0000000..ab66356 --- /dev/null +++ b/gost34112012512/pbkdf2_test.go @@ -0,0 +1,157 @@ +// GoGOST -- Pure Go GOST cryptographic functions library +// Copyright (C) 2015-2024 Sergey Matveev +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +package gost34112012512 + +import ( + "bytes" + "testing" + + "golang.org/x/crypto/pbkdf2" +) + +// Test vectors from http://tc26.ru/.../R_50.1.111-2016.pdf + +func Test1(t *testing.T) { + if !bytes.Equal(pbkdf2.Key( + []byte("password"), + []byte("salt"), + 1, + 64, + New, + ), []byte{ + 0x64, 0x77, 0x0a, 0xf7, 0xf7, 0x48, 0xc3, 0xb1, + 0xc9, 0xac, 0x83, 0x1d, 0xbc, 0xfd, 0x85, 0xc2, + 0x61, 0x11, 0xb3, 0x0a, 0x8a, 0x65, 0x7d, 0xdc, + 0x30, 0x56, 0xb8, 0x0c, 0xa7, 0x3e, 0x04, 0x0d, + 0x28, 0x54, 0xfd, 0x36, 0x81, 0x1f, 0x6d, 0x82, + 0x5c, 0xc4, 0xab, 0x66, 0xec, 0x0a, 0x68, 0xa4, + 0x90, 0xa9, 0xe5, 0xcf, 0x51, 0x56, 0xb3, 0xa2, + 0xb7, 0xee, 0xcd, 0xdb, 0xf9, 0xa1, 0x6b, 0x47, + }) { + t.FailNow() + } +} + +func Test2(t *testing.T) { + if !bytes.Equal(pbkdf2.Key( + []byte("password"), + []byte("salt"), + 2, + 64, + New, + ), []byte{ + 0x5a, 0x58, 0x5b, 0xaf, 0xdf, 0xbb, 0x6e, 0x88, + 0x30, 0xd6, 0xd6, 0x8a, 0xa3, 0xb4, 0x3a, 0xc0, + 0x0d, 0x2e, 0x4a, 0xeb, 0xce, 0x01, 0xc9, 0xb3, + 0x1c, 0x2c, 0xae, 0xd5, 0x6f, 0x02, 0x36, 0xd4, + 0xd3, 0x4b, 0x2b, 0x8f, 0xbd, 0x2c, 0x4e, 0x89, + 0xd5, 0x4d, 0x46, 0xf5, 0x0e, 0x47, 0xd4, 0x5b, + 0xba, 0xc3, 0x01, 0x57, 0x17, 0x43, 0x11, 0x9e, + 0x8d, 0x3c, 0x42, 0xba, 0x66, 0xd3, 0x48, 0xde, + }) { + t.FailNow() + } +} + +func Test4096(t *testing.T) { + if !bytes.Equal(pbkdf2.Key( + []byte("password"), + []byte("salt"), + 4096, + 64, + New, + ), []byte{ + 0xe5, 0x2d, 0xeb, 0x9a, 0x2d, 0x2a, 0xaf, 0xf4, + 0xe2, 0xac, 0x9d, 0x47, 0xa4, 0x1f, 0x34, 0xc2, + 0x03, 0x76, 0x59, 0x1c, 0x67, 0x80, 0x7f, 0x04, + 0x77, 0xe3, 0x25, 0x49, 0xdc, 0x34, 0x1b, 0xc7, + 0x86, 0x7c, 0x09, 0x84, 0x1b, 0x6d, 0x58, 0xe2, + 0x9d, 0x03, 0x47, 0xc9, 0x96, 0x30, 0x1d, 0x55, + 0xdf, 0x0d, 0x34, 0xe4, 0x7c, 0xf6, 0x8f, 0x4e, + 0x3c, 0x2c, 0xda, 0xf1, 0xd9, 0xab, 0x86, 0xc3, + }) { + t.FailNow() + } +} + +func TestWithZero(t *testing.T) { + if !bytes.Equal(pbkdf2.Key( + []byte("pass\x00word"), + []byte("sa\x00lt"), + 4096, + 64, + New, + ), []byte{ + 0x50, 0xdf, 0x06, 0x28, 0x85, 0xb6, 0x98, 0x01, + 0xa3, 0xc1, 0x02, 0x48, 0xeb, 0x0a, 0x27, 0xab, + 0x6e, 0x52, 0x2f, 0xfe, 0xb2, 0x0c, 0x99, 0x1c, + 0x66, 0x0f, 0x00, 0x14, 0x75, 0xd7, 0x3a, 0x4e, + 0x16, 0x7f, 0x78, 0x2c, 0x18, 0xe9, 0x7e, 0x92, + 0x97, 0x6d, 0x9c, 0x1d, 0x97, 0x08, 0x31, 0xea, + 0x78, 0xcc, 0xb8, 0x79, 0xf6, 0x70, 0x68, 0xcd, + 0xac, 0x19, 0x10, 0x74, 0x08, 0x44, 0xe8, 0x30, + }) { + t.FailNow() + } +} + +func Test100(t *testing.T) { + if !bytes.Equal(pbkdf2.Key( + []byte("passwordPASSWORDpassword"), + []byte("saltSALTsaltSALTsaltSALTsaltSALTsalt"), + 4096, + 100, + New, + ), []byte{ + 0xb2, 0xd8, 0xf1, 0x24, 0x5f, 0xc4, 0xd2, 0x92, + 0x74, 0x80, 0x20, 0x57, 0xe4, 0xb5, 0x4e, 0x0a, + 0x07, 0x53, 0xaa, 0x22, 0xfc, 0x53, 0x76, 0x0b, + 0x30, 0x1c, 0xf0, 0x08, 0x67, 0x9e, 0x58, 0xfe, + 0x4b, 0xee, 0x9a, 0xdd, 0xca, 0xe9, 0x9b, 0xa2, + 0xb0, 0xb2, 0x0f, 0x43, 0x1a, 0x9c, 0x5e, 0x50, + 0xf3, 0x95, 0xc8, 0x93, 0x87, 0xd0, 0x94, 0x5a, + 0xed, 0xec, 0xa6, 0xeb, 0x40, 0x15, 0xdf, 0xc2, + 0xbd, 0x24, 0x21, 0xee, 0x9b, 0xb7, 0x11, 0x83, + 0xba, 0x88, 0x2c, 0xee, 0xbf, 0xef, 0x25, 0x9f, + 0x33, 0xf9, 0xe2, 0x7d, 0xc6, 0x17, 0x8c, 0xb8, + 0x9d, 0xc3, 0x74, 0x28, 0xcf, 0x9c, 0xc5, 0x2a, + 0x2b, 0xaa, 0x2d, 0x3a, + }) { + t.FailNow() + } +} + +func Test16777216(t *testing.T) { + t.Skip("takes too long") + if !bytes.Equal(pbkdf2.Key( + []byte("password"), + []byte("salt"), + 16777216, + 64, + New, + ), []byte{ + 0x49, 0xe4, 0x84, 0x3b, 0xba, 0x76, 0xe3, 0x00, + 0xaf, 0xe2, 0x4c, 0x4d, 0x23, 0xdc, 0x73, 0x92, + 0xde, 0xf1, 0x2f, 0x2c, 0x0e, 0x24, 0x41, 0x72, + 0x36, 0x7c, 0xd7, 0x0a, 0x89, 0x82, 0xac, 0x36, + 0x1a, 0xdb, 0x60, 0x1c, 0x7e, 0x2a, 0x31, 0x4e, + 0x8c, 0xb7, 0xb1, 0xe9, 0xdf, 0x84, 0x0e, 0x36, + 0xab, 0x56, 0x15, 0xbe, 0x5d, 0x74, 0x2b, 0x6c, + 0xf2, 0x03, 0xfb, 0x55, 0xfd, 0xc4, 0x80, 0x71, + }) { + t.FailNow() + } +} diff --git a/install.texi b/install.texi index 891ac9d..3e72eb0 100644 --- a/install.texi +++ b/install.texi @@ -8,7 +8,7 @@ website and, for example, run tests with benchmarks: $ [fetch|wget] http://www.gogost.cypherpunks.ru/gogost-@value{VERSION}.tar.zst $ [fetch|wget] http://www.gogost.cypherpunks.ru/gogost-@value{VERSION}.tar.zst.@{asc,sig@} [verify signature] -$ zstd -d gogost-@value{VERSION}.tar.zst | tar xf - +$ tar xf gogost-@value{VERSION}.tar.zst $ cd gogost-@value{VERSION} $ go build -mod=vendor -o streebog256 ./cmd/streebog256 $ echo hello world | ./streebog256 @@ -24,7 +24,7 @@ like this: $ mkdir -p myproj/vendor/go.cypherpunks.ru/gogost $ mv gogost-@value{VERSION} myproj/vendor/go.cypherpunks.ru/gogost/v5 $ cd myproj -$ cat > main.go <main.go < VERSION +./version >VERSION go mod vendor -cat > download.texi <download.texi < $texi <$texi < $texi < $texi <$texi < $texi < $texi <$texi < "$tarball".meta4 + http://y.www.gogost.cypherpunks.ru/"$tarball" <"$tarball" >"$tarball".meta4 size=$(( $(stat -f %z $tarball) / 1024 )) release_date=$(date "+%Y-%m-%d") @@ -104,7 +104,7 @@ GoGOST'es home page is: http://www.gogost.cypherpunks.ru/ Source code and its signature for that version can be found here: http://www.gogost.cypherpunks.ru/gogost-${release}.tar.zst ($size KiB) - http://www.gogost.cypherpunks.ru/gogost-${release}.tar.zst.asc + http://www.gogost.cypherpunks.ru/gogost-${release}.tar.zst.{asc,sig} OpenPGP key: CEBD 1282 2C46 9C02 A81A 0467 8234 3436 696F C85A GoGOST releases @@ -135,7 +135,7 @@ GoGOST это свободное программное обеспечение Исходный код и его подпись для этой версии могут быть найдены здесь: http://www.gogost.cypherpunks.ru/gogost-${release}.tar.zst ($size KiB) - http://www.gogost.cypherpunks.ru/gogost-${release}.tar.zst.asc + http://www.gogost.cypherpunks.ru/gogost-${release}.tar.zst.{asc,sig} OpenPGP ключ: CEBD 1282 2C46 9C02 A81A 0467 8234 3436 696F C85A GoGOST releases diff --git a/news.texi b/news.texi index fdca692..bd73cc2 100644 --- a/news.texi +++ b/news.texi @@ -3,6 +3,13 @@ @table @strong +@anchor{Release 5.14.1} +@item 5.14.1 + @itemize + @item Forgotten @code{Version} raise + @item Streebog-512 PBKDF2 test vectors + @end itemize + @anchor{Release 5.14.0} @item 5.14.0 28147-89 and CryptoPro key wrapping support diff --git a/version b/version index 0775f20..5fa0ac9 100755 --- a/version +++ b/version @@ -1,3 +1,3 @@ #!/bin/sh -e -exec perl -ne 'print "$1\n" if /Version.*"(.*)"$/' < "$(realpath -- $(dirname "$0"))"/gogost.go +exec perl -ne 'print "$1\n" if /Version.*"(.*)"$/' <"$(realpath -- $(dirname "$0"))"/gogost.go