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

Error when decrypting. #2

Closed
madtechsupport opened this issue Nov 23, 2015 · 2 comments · Fixed by #3
Closed

Error when decrypting. #2

madtechsupport opened this issue Nov 23, 2015 · 2 comments · Fixed by #3
Assignees
Labels

Comments

@madtechsupport
Copy link

Hi,

I'm getting the following error when decrypting:

gauth
Encryption password:
panic: runtime error: index out of range

goroutine 1 [running]:
main.main()
    /Users/warren/Go/src/github.com/pcarrier/gauth/gauth.go:106 +0x8d8

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
    /usr/local/go/src/runtime/asm_amd64.s:1696 +0x1

goroutine 20 [syscall]:
os/signal.loop()
    /usr/local/go/src/os/signal/signal_unix.go:22 +0x18
created by os/signal.init.1
    /usr/local/go/src/os/signal/signal_unix.go:28 +0x37

goroutine 34 [select, locked to thread]:
runtime.gopark(0x1a2390, 0xc8200bc728, 0x164fd0, 0x6, 0x2c818, 0x2)
    /usr/local/go/src/runtime/proc.go:185 +0x163
runtime.selectgoImpl(0xc8200bc728, 0x0, 0x18)
    /usr/local/go/src/runtime/select.go:392 +0xa64
runtime.selectgo(0xc8200bc728)
    /usr/local/go/src/runtime/select.go:212 +0x12
runtime.ensureSigM.func1()
    /usr/local/go/src/runtime/signal1_unix.go:227 +0x323
runtime.goexit()
    /usr/local/go/src/runtime/asm_amd64.s:1696 +0x1

I'm using the following versions:

go version
go version go1.5.1 darwin/amd64
openssl version
OpenSSL 0.9.8zg 14 July 2015
sw_vers
ProductName:    Mac OS X
ProductVersion: 10.10.5
BuildVersion:   14F1021

Any thoughts?

@pcarrier
Copy link
Owner

Oh got it. Looks like encryption is in a poor shape. Should be easy to fix.

i should be initialized at len(rest) - 1 in:

    i := len(rest)
    for rest[i] < 16 {
        i--
    }

@pcarrier pcarrier added the bug label Nov 23, 2015
@pcarrier pcarrier self-assigned this Nov 23, 2015
pcarrier pushed a commit that referenced this issue Dec 3, 2015
- moving to crypto/ssh/terminal, which should also work on Windows
  and be better maintained (code.google.com is going away)
- fix support for padding

Closes #2.
@pcarrier pcarrier mentioned this issue Dec 3, 2015
@pcarrier
Copy link
Owner

pcarrier commented Dec 3, 2015

Thanks for the report, sorry for the delay! Should be fixed in master in minutes.

pcarrier pushed a commit that referenced this issue Dec 3, 2015
pcarrier pushed a commit that referenced this issue Feb 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants