]> Cypherpunks.ru repositories - gogost.git/blob - install.texi
Forgotten download links inclusion
[gogost.git] / install.texi
1 @node Download
2 @unnumbered Download
3
4 @set VERSION 4.2.1
5
6 Preferable way is to download tarball with the signature from
7 website and, for example, run tests with benchmarks:
8
9 @example
10 $ [fetch|wget] http://gogost.cypherpunks.ru/gogost-@value{VERSION}.tar.xz
11 $ [fetch|wget] http://gogost.cypherpunks.ru/gogost-@value{VERSION}.tar.xz.sig
12 $ gpg --verify gogost-@value{VERSION}.tar.xz.sig gogost-@value{VERSION}.tar.xz
13 $ xz --decompress --stdout gogost-@value{VERSION}.tar.xz | tar xf -
14 $ make -C gogost-@value{VERSION} all bench
15 $ echo hello world | gogost-@value{VERSION}/streebog256
16 f72018189a5cfb803dbe1f2149cf554c40093d8e7f81c21e08ac5bcd09d9934d
17 @end example
18
19 @include download.texi
20
21 And then you can include its source code in your project for example
22 like this:
23
24 @example
25 $ mkdir -p myproj/src
26 $ cp -r gogost-@value{VERSION}/src/go.cypherpunks.ru myproj/src
27 $ export GOPATH=$PWD/myproj
28 $ cd myproj/src
29 $ cat > main.go <<EOF
30 package main
31
32 import (
33     "encoding/hex"
34     "fmt"
35
36     "go.cypherpunks.ru/gogost/v4/gost34112012256"
37 )
38
39 func main() @{
40     h := gost34112012256.New()
41     h.Write([]byte("hello world\n"))
42     fmt.Println(hex.EncodeToString(h.Sum(nil)))
43 @}
44 EOF
45 $ go run main.go
46 f72018189a5cfb803dbe1f2149cf554c40093d8e7f81c21e08ac5bcd09d9934d
47 @end example
48
49 You @strong{have to} verify downloaded tarballs integrity and
50 authenticity to be sure that you retrieved trusted and untampered
51 software. @url{https://www.gnupg.org/, GNU Privacy Guard} is used
52 for that purpose.
53
54 For the very first time it is necessary to get signing public key and
55 import it. It is provided below, but you should check alternative
56 resources.
57
58 @verbatim
59 pub   rsa2048/0x82343436696FC85A 2016-09-13 [SC]
60       CEBD 1282 2C46 9C02 A81A  0467 8234 3436 696F C85A
61 uid   GoGOST releases <gogost at cypherpunks dot ru>
62 @end verbatim
63
64 @itemize
65
66 @item @url{https://lists.cypherpunks.ru/mailman/listinfo/gost, gost} maillist
67
68 @item
69 @example
70 $ gpg --auto-key-locate dane --locate-keys gogost at cypherpunks dot ru
71 $ gpg --auto-key-locate wkd --locate-keys gogost at cypherpunks dot ru
72 @end example
73
74 @item
75 @verbatiminclude PUBKEY.asc
76
77 @end itemize
78
79 GoGOST is also @command{go get}-able. For example to use
80 @command{streebog256} utility:
81
82 @example
83 $ go get go.cypherpunks.ru/gogost/cmd/streebog256
84 @end example
85
86 @code{go.cypherpunks.ru} uses @url{https://www.cacert.org/, CACert.org}
87 certificate authority, that is not included by default in some operating
88 system distributions and probably you have to install it in your system,
89 because @command{go get} uses HTTPS connections. If you have issues
90 using either @code{sum.golang.org} or @code{proxy.golang.org}, then you
91 can disable their usage with @env{GOPRIVATE=go.cypherpunks.ru/gogost}
92 environment variable.
93
94 Also you can use @code{replace} feature inside your @file{go.mod}, like:
95
96 @example
97 require go.cypherpunks.ru/gogost/v4 v@value{VERSION}
98 replace go.cypherpunks.ru/gogost/v4 => /home/stargrave/gogost-@value{VERSION}/src/go.cypherpunks.ru/gogost/v4
99 @end example
100
101 You can obtain development source code with
102 @command{git clone git://git.cypherpunks.ru/gogost.git}.