]> Cypherpunks.ru repositories - gogost.git/blob - INSTALL
Preparing for 2.0 release
[gogost.git] / INSTALL
1 Preferable way is to download tarball with the signature from official
2 website and, for example, run tests with benchmarks:
3
4     % wget http://www.cypherpunks.ru/gogost/gogost-1.1.tar.xz
5     % wget http://www.cypherpunks.ru/gogost/gogost-1.1.tar.xz.sig
6     % gpg --verify gogost-1.1.tar.xz.sig gogost-1.1.tar.xz
7     % xz -d < gogost-1.1.tar.xz | tar xf -
8     % make -C gogost-1.1 bench
9
10 And then you can include its source code in your project for example
11 like this:
12
13     % mkdir -p myproj/src
14     % export GOPATH=$PWD/myproj
15     % cd myproj/src
16     % cat > main.go <<EOF
17     package main
18
19     import (
20         "encoding/hex"
21         "fmt"
22
23         "cypherpunks.ru/gogost/gost34112012256"
24     )
25
26     func main() {
27         h := gost34112012256.New()
28         h.Write([]byte("hello world"))
29         fmt.Println(hex.EncodeToString(h.Sum(nil)))
30     }
31     EOF
32     % cp -r ../../gogost-1.1/src/cypherpunks.ru .
33     % go run main.go
34     c600fd9dd049cf8abd2f5b32e840d2cb0e41ea44de1c155dcd88dc84fe58a855
35
36 You have to verify downloaded tarballs integrity and authenticity to be
37 sure that you retrieved trusted and untampered software. GNU Privacy
38 Guard is used for that purpose.
39
40 For the very first time it it necessary to get signing public key and
41 import it. It is provided below, but you should check alternative
42 resources.
43
44     pub   rsa2048/0x82343436696FC85A 2016-09-13 [SC]
45           CEBD 1282 2C46 9C02 A81A  0467 8234 3436 696F C85A
46     uid   GoGOST releases <gogost at cypherpunks dot ru>
47
48     Look in PUBKEY.asc file.
49     % gpg --keyserver hkp://keys.gnupg.net/ --recv-keys 0x82343436696FC85A
50     % gpg --auto-key-locate dane --locate-keys gogost at cypherpunks dot ru
51     % gpg --auto-key-locate wkd --locate-keys gogost at cypherpunks dot ru
52     % gpg --auto-key-locate pka --locate-keys gogost at cypherpunks dot ru