Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test failed in salsa20 #3

Closed
xiegeo opened this issue Sep 12, 2019 · 1 comment
Closed

Test failed in salsa20 #3

xiegeo opened this issue Sep 12, 2019 · 1 comment

Comments

@xiegeo
Copy link

xiegeo commented Sep 12, 2019

go test -v github.com/davidlazar/go-crypto/salsa20 failed

FAIL: TestRandom (0.01s) panic: salsa20: output smaller than input
=== RUN   TestSalsa20
--- PASS: TestSalsa20 (0.11s)
=== RUN   TestXSalsa20
--- PASS: TestXSalsa20 (0.00s)
=== RUN   TestRandom
--- FAIL: TestRandom (0.01s)
panic: salsa20: output smaller than input [recovered]
        panic: salsa20: output smaller than input

goroutine 21 [running]:
testing.tRunner.func1(0xc0000bc300)
        c:/go/src/testing/testing.go:830 +0x6a4
panic(0x5d5ce0, 0x638e10)
        c:/go/src/runtime/panic.go:522 +0x1c3
golang.org/x/crypto/salsa20.XORKeyStream(0x7721d0, 0x0, 0x0, 0xc0000602e4, 0x2, 0x2, 0xc000060208, 0x8, 0x8, 0xc00005e240)
        C:/Users/xiege/go/pkg/mod/golang.org/x/crypto@v0.0.0-20190911031432-227b76d455e7/salsa20/salsa20.go:36 +0x2ea
github.com/davidlazar/go-crypto/salsa20.TestRandom(0xc0000bc300)
        C:/Users/xiege/go/pkg/mod/github.com/davidlazar/go-crypto@v0.0.0-20190522120613-62389b5e4ae0/salsa20/salsa20_test.go:40 +0x511
testing.tRunner(0xc0000bc300, 0x6165a0)
        c:/go/src/testing/testing.go:865 +0x16b
created by testing.(*T).Run
        c:/go/src/testing/testing.go:916 +0x662
FAIL    github.com/davidlazar/go-crypto/salsa20 0.651s

Using version go-crypto@v0.0.0-20190522120613-62389b5e4ae0,
golang.org/x/crypto@v0.0.0-20190911031432-227b76d455e7,
and go version go1.12.9 windows/amd64

davidlazar added a commit that referenced this issue Sep 12, 2019
This avoids a panic introduced by https://go-review.googlesource.com/112235

Fixes issue #3
@davidlazar
Copy link
Owner

Fixed; thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants