Skip to content

Commit

Permalink
Update dependencies and Go Version
Browse files Browse the repository at this point in the history
  • Loading branch information
dev committed Feb 7, 2024
1 parent 4f390aa commit 17fd340
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.21 AS go
FROM golang:1.22 AS go

FROM ubuntu:latest

Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ download_and_verify_deps:
.PHONY: tidy
tidy:
go mod tidy
go mod tidy

.PHONY: update_deps
update_deps:
Expand Down
2 changes: 1 addition & 1 deletion encoding/encoding_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"fmt"
"testing"

stdxbase32 "git.sr.ht/~pingoo/stdx/base32"
akamenskybase58 "github.com/akamensky/base58"
stdxbase32 "github.com/bloom42/stdx/base32"
mrtronbase58 "github.com/mr-tron/base58"
"github.com/skerkour/go-benchmarks/utils"
)
Expand Down
24 changes: 12 additions & 12 deletions encryption_aead/encryption_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
"fmt"
"testing"

"github.com/bloom42/stdx/crypto/bchacha20blake3"
"github.com/bloom42/stdx/crypto/chacha20"
"github.com/bloom42/stdx/crypto/chacha20blake3"
"github.com/bloom42/stdx/crypto/zchacha20blake3"
"git.sr.ht/~pingoo/stdx/crypto/bchacha20blake3"
"git.sr.ht/~pingoo/stdx/crypto/chacha20"
"git.sr.ht/~pingoo/stdx/crypto/chacha20blake3"
"git.sr.ht/~pingoo/stdx/crypto/schacha20blake3"
"github.com/skerkour/go-benchmarks/utils"
"golang.org/x/crypto/chacha20poly1305"
)
Expand Down Expand Up @@ -56,7 +56,7 @@ func BenchmarkEncryptAEAD(b *testing.B) {
benchmarkEncrypt(b, size, "AES_256_GCM", newAesGcmCipher(b, aes256GcmKey), aes256GcmNonce, additionalData)
benchmarkEncrypt(b, size, "AES_128_GCM", newAesGcmCipher(b, aes128GcmKey), aes128GcmNonce, additionalData)
benchmarkEncrypt(b, size, "BChaCha20_BLAKE3", newBChaCha20Blake3Cipher(b, xChaCha20Key), bChaCha20Nonce, additionalData)
benchmarkEncrypt(b, size, "ZChaCha20_BLAKE3", newZChaCha20Blake3Cipher(b, xChaCha20Key), bChaCha20Nonce, additionalData)
benchmarkEncrypt(b, size, "SChaCha20_BLAKE3", newSChaCha20Blake3Cipher(b, xChaCha20Key), bChaCha20Nonce, additionalData)
}
}

Expand Down Expand Up @@ -84,7 +84,7 @@ func BenchmarkDecryptAEAD(b *testing.B) {
benchmarkDecrypt(b, size, "AES_256_GCM", newAesGcmCipher(b, aes256GcmKey), aes256GcmNonce, additionalData)
benchmarkDecrypt(b, size, "AES_128_GCM", newAesGcmCipher(b, aes128GcmKey), aes128GcmNonce, additionalData)
benchmarkDecrypt(b, size, "BChaCha20_BLAKE3", newBChaCha20Blake3Cipher(b, xChaCha20Key), bChaCha20Nonce, additionalData)
benchmarkDecrypt(b, size, "ZChaCha20_BLAKE3", newZChaCha20Blake3Cipher(b, xChaCha20Key), bChaCha20Nonce, additionalData)
benchmarkDecrypt(b, size, "SChaCha20_BLAKE3", newSChaCha20Blake3Cipher(b, xChaCha20Key), bChaCha20Nonce, additionalData)
}
}

Expand Down Expand Up @@ -162,26 +162,26 @@ func (cipher bChaCha20Blake3Cipher) Decrypt(dst, nonce, ciphertext, additionalDa
_, _ = cipher.cipher.Open(dst, nonce, ciphertext, additionalData)
}

type zChaCha20Blake3Cipher struct {
type sChaCha20Blake3Cipher struct {
cipher cipher.AEAD
}

func newZChaCha20Blake3Cipher(b *testing.B, key []byte) zChaCha20Blake3Cipher {
cipher, err := zchacha20blake3.New(key)
func newSChaCha20Blake3Cipher(b *testing.B, key []byte) sChaCha20Blake3Cipher {
cipher, err := schacha20blake3.New(key)
if err != nil {
b.Error(err)
}

return zChaCha20Blake3Cipher{
return sChaCha20Blake3Cipher{
cipher: cipher,
}
}

func (cipher zChaCha20Blake3Cipher) Encrypt(dst, nonce, plaintext, additionalData []byte) []byte {
func (cipher sChaCha20Blake3Cipher) Encrypt(dst, nonce, plaintext, additionalData []byte) []byte {
return cipher.cipher.Seal(dst, nonce, plaintext, additionalData)
}

func (cipher zChaCha20Blake3Cipher) Decrypt(dst, nonce, ciphertext, additionalData []byte) {
func (cipher sChaCha20Blake3Cipher) Decrypt(dst, nonce, ciphertext, additionalData []byte) {
_, _ = cipher.cipher.Open(dst, nonce, ciphertext, additionalData)
}

Expand Down
4 changes: 2 additions & 2 deletions encryption_unauthenticated/encryption_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"fmt"
"testing"

"github.com/bloom42/stdx/crypto/chacha"
"github.com/bloom42/stdx/crypto/chacha20"
"git.sr.ht/~pingoo/stdx/crypto/chacha"
"git.sr.ht/~pingoo/stdx/crypto/chacha20"
"github.com/skerkour/go-benchmarks/utils"
"golang.org/x/crypto/chacha20poly1305"
)
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ module github.com/skerkour/go-benchmarks
go 1.21

require (
git.sr.ht/~pingoo/stdx v0.0.0-20240206094048-8ec6ee9ddf91
github.com/DataDog/zstd v1.5.5
github.com/akamensky/base58 v0.0.0-20210829145138-ce8bf8802e8f
github.com/bloom42/stdx v0.0.0-20240126081149-e6c42714b074
github.com/cespare/xxhash/v2 v2.2.0
github.com/golang/snappy v0.0.4
github.com/jotfs/fastcdc-go v0.2.0
github.com/klauspost/compress v1.17.4
github.com/klauspost/compress v1.17.5
github.com/mr-tron/base58 v1.2.0
github.com/pierrec/lz4/v4 v4.1.17
github.com/restic/chunker v0.4.0
Expand All @@ -18,7 +18,7 @@ require (
github.com/zeebo/xxh3 v1.0.2
golang.org/x/crypto v0.18.0
golang.org/x/sys v0.16.0
lukechampine.com/blake3 v1.1.7
lukechampine.com/blake3 v1.2.1
)

require github.com/klauspost/cpuid/v2 v2.2.6 // indirect
13 changes: 6 additions & 7 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
git.sr.ht/~pingoo/stdx v0.0.0-20240206094048-8ec6ee9ddf91 h1:VA5v8vTXKxZL+aJjDIPCVSQGg4ngjT7CxFfWDPBbW/Q=
git.sr.ht/~pingoo/stdx v0.0.0-20240206094048-8ec6ee9ddf91/go.mod h1:/dMG66ZEu33y+aa3qQh/o+x0RFVc1qJSrG5v1+Ur7DM=
github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ=
github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw=
github.com/akamensky/base58 v0.0.0-20210829145138-ce8bf8802e8f h1:z8MkSJCUyTmW5YQlxsMLBlwA7GmjxC7L4ooicxqnhz8=
github.com/akamensky/base58 v0.0.0-20210829145138-ce8bf8802e8f/go.mod h1:UdUwYgAXBiL+kLfcqxoQJYkHA/vl937/PbFhZM34aZs=
github.com/bloom42/stdx v0.0.0-20240126081149-e6c42714b074 h1:/YajWC9u25qqJ/+ttMP8Z3mGzpVYrtfEj6Fx6zG2nVI=
github.com/bloom42/stdx v0.0.0-20240126081149-e6c42714b074/go.mod h1:zZWdLGQq1BX7GoDuZZPyyE0WUTy5MmNtPB6+8TB6Mf0=
github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44=
github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM=
github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/jotfs/fastcdc-go v0.2.0 h1:WHYIGk3k9NumGWfp4YMsemEcx/s4JKpGAa6tpCpHJOo=
github.com/jotfs/fastcdc-go v0.2.0/go.mod h1:PGFBIloiASFbiKnkCd/hmHXxngxYDYtisyurJ/zyDNM=
github.com/klauspost/compress v1.17.4 h1:Ej5ixsIri7BrIjBkRZLTo6ghwrEtHFk7ijlczPW4fZ4=
github.com/klauspost/compress v1.17.4/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM=
github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
github.com/klauspost/compress v1.17.5 h1:d4vBd+7CHydUqpFBgUEKkSdtSugf9YFmSkvUYPquI5E=
github.com/klauspost/compress v1.17.5/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM=
github.com/klauspost/cpuid/v2 v2.0.12/go.mod h1:g2LTdtYhdyuGPqyWyv7qRAmj1WBqxuObKfj5c0PQa7c=
github.com/klauspost/cpuid/v2 v2.2.6 h1:ndNyv040zDGIDh8thGkXYjnFtiN02M1PVVF+JE/48xc=
github.com/klauspost/cpuid/v2 v2.2.6/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws=
Expand All @@ -38,5 +37,5 @@ golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1m
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU=
golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
lukechampine.com/blake3 v1.1.7 h1:GgRMhmdsuK8+ii6UZFDL8Nb+VyMwadAgcJyfYHxG6n0=
lukechampine.com/blake3 v1.1.7/go.mod h1:tkKEOtDkNtklkXtLNEOGNq5tcV90tJiA1vAA12R78LA=
lukechampine.com/blake3 v1.2.1 h1:YuqqRuaqsGV71BV/nm9xlI0MKUv4QC54jQnBChWbGnI=
lukechampine.com/blake3 v1.2.1/go.mod h1:0OFRp7fBtAylGVCO40o87sbupkyIGgbpv1+M1k1LM6k=
2 changes: 1 addition & 1 deletion kdf/kdf_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"io"
"testing"

"github.com/bloom42/stdx/crypto/chacha20"
"git.sr.ht/~pingoo/stdx/crypto/chacha20"
"github.com/skerkour/go-benchmarks/utils"
zeeboblake3 "github.com/zeebo/blake3"
"golang.org/x/crypto/hkdf"
Expand Down
2 changes: 1 addition & 1 deletion tools/system_info/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"runtime"
"time"

"github.com/bloom42/stdx/cpuinfo"
"git.sr.ht/~pingoo/stdx/cpuinfo"
"golang.org/x/sys/cpu"
)

Expand Down

0 comments on commit 17fd340

Please sign in to comment.