Skip to content

Commit

Permalink
go.mod: fix jacobsa/crypto build on riscv64
Browse files Browse the repository at this point in the history
Replace dependency jacobsa/crypto with a fork with support for riscv64.

Issue: rfjakob#666

Upstream PR: jacobsa/crypto#13

Unaddressed on jacobsa/crypto:

jacobsa/crypto#14 (comment)

Signed-off-by: Christian Stewart <christian@paral.in>
  • Loading branch information
paralin committed Dec 8, 2022
1 parent 971e9d7 commit 48b3481
Show file tree
Hide file tree
Showing 27 changed files with 69 additions and 148 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ Changelog
* **Add reverse mode ([#19](https://github.com/rfjakob/gocryptfs/issues/19))**
* AES-SIV (RFC5297) encryption to implement deterministic encryption
securely. Uses the excellent
[jacobsa/crypto](https://github.com/jacobsa/crypto) library.
[jacobsa/crypto](https://github.com/aperturerobotics/jacobsa-crypto) library.
The corresponding feature flag is called `AESSIV`.
* New command-line options: `-reverse`, `-aessiv`
* Filesystems using reverse mode can only be mounted with gocryptfs v1.1
Expand Down
12 changes: 5 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,17 @@ module github.com/rfjakob/gocryptfs/v2

go 1.16

// prevent golang.org/x/sys from being changed
replace golang.org/x/sys => golang.org/x/sys v0.0.0-20210817190340-bfb29a6856f2

require (
github.com/aperturerobotics/jacobsa-crypto v1.0.1
github.com/hanwen/go-fuse/v2 v2.1.1-0.20221117175120-915cf5413cde
github.com/jacobsa/crypto v0.0.0-20190317225127-9f44e2d11115
github.com/jacobsa/oglematchers v0.0.0-20150720000706-141901ea67cd // indirect
github.com/jacobsa/oglemock v0.0.0-20150831005832-e94d794d06ff // indirect
github.com/jacobsa/ogletest v0.0.0-20170503003838-80d50a735a11 // indirect
github.com/jacobsa/reqtrace v0.0.0-20150505043853-245c9e0234cb // indirect
github.com/pkg/xattr v0.4.3
github.com/rfjakob/eme v1.1.2
github.com/sabhiram/go-gitignore v0.0.0-20201211210132-54b8a0bf510f
github.com/spf13/pflag v1.0.5
golang.org/x/crypto v0.0.0-20210817164053-32db794688a5
golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d // indirect
golang.org/x/sys v0.0.0-20210817190340-bfb29a6856f2
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a
golang.org/x/term v0.0.0-20220722155259-a9ba230a4035
)
20 changes: 6 additions & 14 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
github.com/aperturerobotics/jacobsa-crypto v1.0.1 h1:BsIgQFvT0uveYFe+0hc7SwSsCNNIPmxFjm9oi0qGdGM=
github.com/aperturerobotics/jacobsa-crypto v1.0.1/go.mod h1:oR/7BV4/0QbjutdWNOQ2N0PxGPT9qFVDi4gw0UepxDA=
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/hanwen/go-fuse/v2 v2.1.1-0.20211219085202-934a183ed914 h1:hGXMxS1wTE4y+f7iBqFArrJ6X8QozHnEdnVzGZI9Ywc=
github.com/hanwen/go-fuse/v2 v2.1.1-0.20211219085202-934a183ed914/go.mod h1:B1nGE/6RBFyBRC1RRnf23UpwCdyJ31eukw34oAKukAc=
github.com/hanwen/go-fuse/v2 v2.1.1-0.20220822120740-58a7e145ff0d h1:nzUYOBVDJ6T1QjPbo7HMdmUlW7+DTV+E64AnNILQYhk=
github.com/hanwen/go-fuse/v2 v2.1.1-0.20220822120740-58a7e145ff0d/go.mod h1:B1nGE/6RBFyBRC1RRnf23UpwCdyJ31eukw34oAKukAc=
github.com/hanwen/go-fuse/v2 v2.1.1-0.20221117175120-915cf5413cde h1:fgTauqHA48CDt+qVQR+PJXqiI9bpYQglMIIi+h/mMts=
github.com/hanwen/go-fuse/v2 v2.1.1-0.20221117175120-915cf5413cde/go.mod h1:B1nGE/6RBFyBRC1RRnf23UpwCdyJ31eukw34oAKukAc=
github.com/jacobsa/crypto v0.0.0-20190317225127-9f44e2d11115 h1:YuDUUFNM21CAbyPOpOP8BicaTD/0klJEKt5p8yuw+uY=
github.com/jacobsa/crypto v0.0.0-20190317225127-9f44e2d11115/go.mod h1:LadVJg0XuawGk+8L1rYnIED8451UyNxEMdTWCEt5kmU=
github.com/jacobsa/oglematchers v0.0.0-20150720000706-141901ea67cd h1:9GCSedGjMcLZCrusBZuo4tyKLpKUPenUUqi34AkuFmA=
github.com/jacobsa/oglematchers v0.0.0-20150720000706-141901ea67cd/go.mod h1:TlmyIZDpGmwRoTWiakdr+HA1Tukze6C6XbRVidYq02M=
github.com/jacobsa/oglemock v0.0.0-20150831005832-e94d794d06ff h1:2xRHTvkpJ5zJmglXLRqHiZQNjUoOkhUyhTAhEQvPAWw=
Expand All @@ -34,21 +30,17 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 h1:HWj/xjIHfjYU5nVXpTM0s39J9CbLn7Cc5a7IC5rwsMQ=
golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d h1:LO7XpTYMwTqxjLcGWPijK3vRXg1aWdlNOVOHRq45d7c=
golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220708220712-1185a9018129 h1:vucSRfWwTsoXro7P+3Cjlr6flUMtzCwzlvkxEQtHHB0=
golang.org/x/net v0.0.0-20220708220712-1185a9018129/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20201101102859-da207088b7d1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210817190340-bfb29a6856f2 h1:c8PlLMqBbOHoqtjteWm5/kbe6rNY2pbRfbIMVnepueo=
golang.org/x/sys v0.0.0-20210817190340-bfb29a6856f2/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.0.0-20220722155259-a9ba230a4035 h1:Q5284mrmYTpACcm+eAKjKJH48BBwSyfJqmmGDTtT8Vc=
golang.org/x/term v0.0.0-20220722155259-a9ba230a4035/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
Expand Down
2 changes: 1 addition & 1 deletion internal/siv_aead/correctness_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"encoding/hex"
"testing"

"github.com/jacobsa/crypto/siv"
"github.com/aperturerobotics/jacobsa-crypto/siv"
)

// Test all supported key lengths
Expand Down
4 changes: 2 additions & 2 deletions internal/siv_aead/siv_aead.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"crypto/cipher"
"log"

"github.com/jacobsa/crypto/siv"
"github.com/aperturerobotics/jacobsa-crypto/siv"
)

type sivAead struct {
Expand Down Expand Up @@ -63,7 +63,7 @@ func (s *sivAead) Seal(dst, nonce, plaintext, authData []byte) []byte {
if len(s.key) == 0 {
log.Panic("Key has been wiped?")
}
// https://github.com/jacobsa/crypto/blob/master/siv/encrypt.go#L48:
// https://github.com/aperturerobotics/jacobsa-crypto/blob/master/siv/encrypt.go#L48:
// As per RFC 5297 section 3, you may use this function for nonce-based
// authenticated encryption by passing a nonce as the last associated
// data element.
Expand Down
2 changes: 1 addition & 1 deletion internal/speed/speed.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ func bGoGCM(b *testing.B) {
bEncrypt(b, gGCM)
}

// bAESSIV benchmarks AES-SIV from github.com/jacobsa/crypto/siv
// bAESSIV benchmarks AES-SIV from github.com/aperturerobotics/jacobsa-crypto/siv
func bAESSIV(b *testing.B) {
c := siv_aead.New(randBytes(64))
bEncrypt(b, c)
Expand Down
File renamed without changes.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

100 changes: 0 additions & 100 deletions vendor/golang.org/x/sys/windows/setupapierrors_windows.go

This file was deleted.

23 changes: 7 additions & 16 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
@@ -1,23 +1,15 @@
# github.com/aperturerobotics/jacobsa-crypto v1.0.1
## explicit
github.com/aperturerobotics/jacobsa-crypto/cmac
github.com/aperturerobotics/jacobsa-crypto/common
github.com/aperturerobotics/jacobsa-crypto/siv
# github.com/hanwen/go-fuse/v2 v2.1.1-0.20221117175120-915cf5413cde
## explicit
github.com/hanwen/go-fuse/v2/fs
github.com/hanwen/go-fuse/v2/fuse
github.com/hanwen/go-fuse/v2/internal
github.com/hanwen/go-fuse/v2/internal/utimens
github.com/hanwen/go-fuse/v2/splice
# github.com/jacobsa/crypto v0.0.0-20190317225127-9f44e2d11115
## explicit
github.com/jacobsa/crypto/cmac
github.com/jacobsa/crypto/common
github.com/jacobsa/crypto/siv
# github.com/jacobsa/oglematchers v0.0.0-20150720000706-141901ea67cd
## explicit
# github.com/jacobsa/oglemock v0.0.0-20150831005832-e94d794d06ff
## explicit
# github.com/jacobsa/ogletest v0.0.0-20170503003838-80d50a735a11
## explicit
# github.com/jacobsa/reqtrace v0.0.0-20150505043853-245c9e0234cb
## explicit
# github.com/pkg/xattr v0.4.3
## explicit
github.com/pkg/xattr
Expand All @@ -39,9 +31,7 @@ golang.org/x/crypto/internal/subtle
golang.org/x/crypto/pbkdf2
golang.org/x/crypto/poly1305
golang.org/x/crypto/scrypt
# golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d
## explicit
# golang.org/x/sys v0.0.0-20210817190340-bfb29a6856f2
# golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a => golang.org/x/sys v0.0.0-20210817190340-bfb29a6856f2
## explicit
golang.org/x/sys/cpu
golang.org/x/sys/internal/unsafeheader
Expand All @@ -51,3 +41,4 @@ golang.org/x/sys/windows
# golang.org/x/term v0.0.0-20220722155259-a9ba230a4035
## explicit
golang.org/x/term
# golang.org/x/sys => golang.org/x/sys v0.0.0-20210817190340-bfb29a6856f2

0 comments on commit 48b3481

Please sign in to comment.