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