Preferable way is to download tarball with the signature from official
website and, for example, run tests with benchmarks:
- % wget http://gogost.cypherpunks.ru/gogost-1.1.tar.xz
- % wget http://gogost.cypherpunks.ru/gogost-1.1.tar.xz.sig
- % gpg --verify gogost-1.1.tar.xz.sig gogost-1.1.tar.xz
- % xz -d < gogost-1.1.tar.xz | tar xf -
- % make -C gogost-1.1 all bench
- % echo hello world | ./gogost-1.1/streebog256
+ $ wget http://gogost.cypherpunks.ru/gogost-4.1.0.tar.xz
+ $ wget http://gogost.cypherpunks.ru/gogost-4.1.0.tar.xz.sig
+ $ gpg --verify gogost-4.1.0.tar.xz.sig gogost-4.1.0.tar.xz
+ $ xz -d < gogost-4.1.0.tar.xz | tar xf -
+ $ make -C gogost-4.1.0 all bench
+ $ echo hello world | ./gogost-4.1.0/streebog256
f72018189a5cfb803dbe1f2149cf554c40093d8e7f81c21e08ac5bcd09d9934d
And then you can include its source code in your project for example
like this:
- % mkdir -p myproj/src
- % export GOPATH=$PWD/myproj
- % cd myproj/src
- % cat > main.go <<EOF
+ $ mkdir -p myproj/src
+ $ cp -r gogost-4.1.0/src/go.cypherpunks.ru myproj/src
+ $ export GOPATH=$PWD/myproj
+ $ cd myproj/src
+ $ cat > main.go <<EOF
package main
import (
"encoding/hex"
"fmt"
- "cypherpunks.ru/gogost/gost34112012256"
+ "go.cypherpunks.ru/gogost/v4/gost34112012256"
)
func main() {
fmt.Println(hex.EncodeToString(h.Sum(nil)))
}
EOF
- % cp -r ../../gogost-1.1/src/cypherpunks.ru .
- % go run main.go
+ $ go run main.go
c600fd9dd049cf8abd2f5b32e840d2cb0e41ea44de1c155dcd88dc84fe58a855
+GoGOST is also go-get-able. For example to use streebog256 utility:
+
+ $ go get go.cypherpunks.ru/gogost/cmd/streebog256
+
You have to verify downloaded tarballs integrity and authenticity to be
sure that you retrieved trusted and untampered software. GNU Privacy
Guard is used for that purpose.
uid GoGOST releases <gogost at cypherpunks dot ru>
Look in PUBKEY.asc file.
- % gpg --auto-key-locate dane --locate-keys gogost at cypherpunks dot ru
- % gpg --auto-key-locate wkd --locate-keys gogost at cypherpunks dot ru
+ $ gpg --auto-key-locate dane --locate-keys gogost at cypherpunks dot ru
+ $ gpg --auto-key-locate wkd --locate-keys gogost at cypherpunks dot ru
+4.1:
+ * ESPTREE implementation
+ * CurveIdtc26gost34102012256paramSetB, CurveIdtc26gost34102012256paramSetC,
+ CurveIdtc26gost34102012256paramSetD curve aliases
+ * Forbid any later GNU GPL version autousage
+ (project's licence now is GNU GPLv3 only)
+ * Project now is go-get-able: go get go.cypherpunks.ru/gogost/v4
+
4.0:
* Backward incompatible change: all keys passing to encryption
functions are slices now, not the fixed arrays. That heavily
-LDFLAGS = -X cypherpunks.ru/gogost.Version=$(VERSION)
+MOD = go.cypherpunks.ru/gogost/v4
+LDFLAGS = -X $(MOD).Version=$(VERSION)
all: streebog256 streebog512
streebog256:
- GOPATH=$(GOPATH) go build -ldflags "$(LDFLAGS)" cypherpunks.ru/gogost/cmd/streebog256
+ GOPATH=$(GOPATH) go build -ldflags "$(LDFLAGS)" $(MOD)/cmd/streebog256
streebog512:
- GOPATH=$(GOPATH) go build -ldflags "$(LDFLAGS)" cypherpunks.ru/gogost/cmd/streebog512
+ GOPATH=$(GOPATH) go build -ldflags "$(LDFLAGS)" $(MOD)/cmd/streebog512
bench:
- GOPATH=$(GOPATH) go test -benchmem -bench . cypherpunks.ru/gogost/...
+ GOPATH=$(GOPATH) go test -benchmem -bench . $(MOD)/...
website and, for example, run tests with benchmarks:
@verbatim
-% wget http://gogost.cypherpunks.ru/gogost-4.0.tar.xz
-% wget http://gogost.cypherpunks.ru/gogost-4.0.tar.xz.sig
-% gpg --verify gogost-4.0.tar.xz.sig gogost-4.0.tar.xz
-% xz -d < gogost-4.0.tar.xz | tar xf -
-% make -C gogost-4.0 all bench
-% echo hello world | ./gogost-4.0/streebog256
+$ wget http://gogost.cypherpunks.ru/gogost-4.1.0.tar.xz
+$ wget http://gogost.cypherpunks.ru/gogost-4.1.0.tar.xz.sig
+$ gpg --verify gogost-4.1.0.tar.xz.sig gogost-4.1.0.tar.xz
+$ xz -d < gogost-4.1.0.tar.xz | tar xf -
+$ make -C gogost-4.1.0 all bench
+$ echo hello world | ./gogost-4.1.0/streebog256
f72018189a5cfb803dbe1f2149cf554c40093d8e7f81c21e08ac5bcd09d9934d
@end verbatim
like this:
@verbatim
-% mkdir -p myproj/src
-% export GOPATH=$PWD/myproj
-% cd myproj/src
-% cat > main.go <<EOF
+$ mkdir -p myproj/src
+$ cp -r gogost-4.1.0/src/go.cypherpunks.ru myproj/src
+$ export GOPATH=$PWD/myproj
+$ cd myproj/src
+$ cat > main.go <<EOF
package main
import (
"encoding/hex"
"fmt"
- "cypherpunks.ru/gogost/gost34112012256"
+ "go.cypherpunks.ru/gogost/v4/gost34112012256"
)
func main() {
fmt.Println(hex.EncodeToString(h.Sum(nil)))
}
EOF
-% cp -r ../../gogost-4.0/src/cypherpunks.ru .
-% go run main.go
+$ go run main.go
c600fd9dd049cf8abd2f5b32e840d2cb0e41ea44de1c155dcd88dc84fe58a855
@end verbatim
+GoGOST is also @command{go get}-able. For example to use
+@command{streebog256} utility:
+@verbatim
+$ go get go.cypherpunks.ru/gogost/cmd/streebog256
+@end verbatim
+
@multitable {XXXXX} {XXXX-XX-XX} {XXXX KiB} {link sign} {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx} {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}
@headitem Version @tab Date @tab Size @tab Tarball @tab SHA256 checksum @tab Streebog-256 checksum
@item
@verbatim
-% gpg --auto-key-locate dane --locate-keys gogost at cypherpunks dot ru
-% gpg --auto-key-locate wkd --locate-keys gogost at cypherpunks dot ru
+$ gpg --auto-key-locate dane --locate-keys gogost at cypherpunks dot ru
+$ gpg --auto-key-locate wkd --locate-keys gogost at cypherpunks dot ru
@end verbatim
@item
cd $tmp/gogost-$release
git checkout $release
-crypto_path=src/cypherpunks.ru/gogost/vendor/golang.org/x/crypto
-mkdir -p $crypto_path
-( cd $cur/gopath/pkg/mod/golang.org/x/crypto@v0.0.0-20190701094942-4def268fd1a4 ; \
+mod_name=$(sed -n 's/^module //p' go.mod)
+crypto_mod_path=$(sed -n 's#^require \(golang.org/x/crypto\) \(.*\)$#\1@\2#p' go.mod)
+mkdir -p src/$mod_name
+mv \
+ gost28147 \
+ gost3410 \
+ gost34112012256 \
+ gost34112012512 \
+ gost341194 \
+ gost3412128 \
+ gost341264 \
+ gost3413 \
+ mgm \
+ internal gogost.go go.mod go.sum src/$mod_name
+
+mkdir -p src/golang.org/x/crypto
+( cd $GOPATH/pkg/mod/$crypto_mod_path ; \
tar cf - AUTHORS CONTRIBUTORS LICENSE PATENTS README.md pbkdf2 hkdf ) |
- tar xfC - $crypto_path
+ tar xfC - src/golang.org/x/crypto
find . -name .git -type d | xargs rm -fr
-rm -f www* makedist* TODO
+rm -f www* news.texi style.css makedist* TODO
find . -type d -exec chmod 700 {} \;
find . -type f -exec chmod 600 {} \;
@item 4.1
@itemize
@item @code{ESPTREE} implementation
+ @item @code{CurveIdtc26gost34102012256paramSetB},
+ @code{CurveIdtc26gost34102012256paramSetC},
+ @code{CurveIdtc26gost34102012256paramSetD} curve aliases
+ @item Forbid any later GNU GPL version autousage
+ (project's licence now is GNU GPLv3 only)
+ @item Project now is go-get-able: @command{go get go.cypherpunks.ru/gogost/v4}
@end itemize