]> Cypherpunks.ru repositories - gogost.git/blob - install.texi
Download link for 5.14.1 release
[gogost.git] / install.texi
1 @node Download
2 @unnumbered Download
3
4 Preferable way is to download tarball with the signature from
5 website and, for example, run tests with benchmarks:
6
7 @example
8 $ [fetch|wget] http://www.gogost.cypherpunks.ru/gogost-@value{VERSION}.tar.zst
9 $ [fetch|wget] http://www.gogost.cypherpunks.ru/gogost-@value{VERSION}.tar.zst.@{asc,sig@}
10 [verify signature]
11 $ tar xf gogost-@value{VERSION}.tar.zst
12 $ cd gogost-@value{VERSION}
13 $ go build -mod=vendor -o streebog256 ./cmd/streebog256
14 $ echo hello world | ./streebog256
15 f72018189a5cfb803dbe1f2149cf554c40093d8e7f81c21e08ac5bcd09d9934d
16 @end example
17
18 @include download.texi
19
20 And then you can include its source code in your project for example
21 like this:
22
23 @example
24 $ mkdir -p myproj/vendor/go.cypherpunks.ru/gogost
25 $ mv gogost-@value{VERSION} myproj/vendor/go.cypherpunks.ru/gogost/v5
26 $ cd myproj
27 $ cat >main.go <<EOF
28 package main
29
30 import (
31     "encoding/hex"
32     "fmt"
33
34     "go.cypherpunks.ru/gogost/v5/gost34112012256"
35 )
36
37 func main() @{
38     h := gost34112012256.New()
39     h.Write([]byte("hello world\n"))
40     fmt.Println(hex.EncodeToString(h.Sum(nil)))
41 @}
42 EOF
43 $ go run main.go
44 f72018189a5cfb803dbe1f2149cf554c40093d8e7f81c21e08ac5bcd09d9934d
45 @end example
46
47 @include integrity.texi
48
49 GoGOST is also @command{go get}-able. For example to install
50 @command{streebog256} utility:
51
52 @example
53 $ go install go.cypherpunks.ru/gogost/v5/cmd/streebog256@@latest
54 @end example
55
56 Aware that @code{go.cypherpunks.ru} uses
57 @url{//www.ca.cypherpunks.ru, ca.cypherpunks.ru} X.509 certificate authority.
58
59 @itemize
60
61 @item Go's default @code{proxy.golang.org} and @code{sum.golang.org}
62 services won't be able to verify @code{go.cypherpunks.ru}'s TLS
63 authenticity, because there are no common trust anchors. You can skip
64 their usage by setting @env{$GOPRIVATE=go.cypherpunks.ru}.
65
66 @item You can (temporarily) override CA bundle during installation with
67 @env{$SSL_CERT_FILE} environment variable.
68
69 @item You can unpack tarball somewhere and use @code{replace} command in
70 your local @file{go.mod}:
71
72 @example
73 require go.cypherpunks.ru/gogost/v5 v@value{VERSION}
74 replace go.cypherpunks.ru/gogost/v5 => /path/to/gogost-@value{VERSION}
75 @end example
76
77 @end itemize
78
79 You can obtain development source code with
80 @command{git clone git://git.cypherpunks.ru/gogost.git}
81 (also you can use @url{https://git.cypherpunks.ru/gogost.git}).