Skip to content
This repository has been archived by the owner on Sep 14, 2020. It is now read-only.

Error: Wrong Password? #25

Open
DOSputin opened this issue Aug 13, 2019 · 13 comments
Open

Error: Wrong Password? #25

DOSputin opened this issue Aug 13, 2019 · 13 comments

Comments

@DOSputin
Copy link

DOSputin commented Aug 13, 2019

Same as closed issue #16

I'm on Arch Linux (manjaro) / Subl 3.2.1 build 3207, and same Same issue.
Error: Wrong Password?

Path to openssl is the standard /usr/bin/openssl
image

Any idea what could be the issue?
Went looking for logs, but didn't find anything.

@mediaupstream
Copy link
Owner

mediaupstream commented Aug 20, 2019

Are you able to use openssl from the command line? What is the output of running

openssl version

in your terminal?

Also, what is the output of running

which openssl

@jayknyn
Copy link

jayknyn commented Aug 26, 2019

Hi Derek, thanks for the plugin.
I'm getting this same Wrong password? prompt when I set "use_pbkdf2" to true and try to encrypt a file (cipher is -aes-256-ofb but gives same error with default -aes128). My outputs:
$ openssl version: LibreSSL 2.6.5
$ which openssl: /usr/bin/openssl

@mediaupstream
Copy link
Owner

Thanks @jayknyn i'll try to reproduce with those settings and see if I can get an idea why it happens. Are you using Linux or Mac?

@jayknyn
Copy link

jayknyn commented Aug 27, 2019 via email

@DOSputin
Copy link
Author

DOSputin commented Aug 29, 2019

openssl version

Version is 1.1.1.c-1 this is standard disto'd via the Arch core

which openssl

Again, same as I had previously stated when I opened the issue, standard location:

$ /usr/bin/openssl

@DOSputin
Copy link
Author

Just out of pure curiosity, decided to try on some Mac's.

I just tried this on two Mac machines, both running on up-to-date dev channel 3208 RC:

The first is High Sierra 10.13.6 with LibreSSL 2.2.7

and the other running Mojave with identical settings to @jayknyn

Resulting in:

Error: Wrong Password?

@mediaupstream
Copy link
Owner

Thanks for checking @DOSputin I've reverted the last few commits which should fix the issue, can you confirm? (You might need to uninstall / reinstall the plugin)

@evhub
Copy link

evhub commented Nov 25, 2019

@mediaupstream What commits did you revert to fix this? I think this change may have broken decryption for one of my files.

@mediaupstream
Copy link
Owner

mediaupstream commented Nov 26, 2019

@evhub this was the PR that I reverted: https://github.com/mediaupstream/SublimeText-Crypto/pull/24/files

I just pushed up a change that may have been causing the issue, if you want to reinstall the plugin and try decrypting again.

It's possible that you encrypted your files while the changes from the reverted PR were in the codebase, resulting in your files being encrypted using pbkdf2 and now you're trying to decrypt without pbkdf2.

If that's true, you could always drop down into openssl and manually decrypt your files using pbkdf2:

openssl enc -d -pbkdf2 -aes128 -base64 -pass "password here" -in encrypted-file.zip -out decrypted-file.zip

you would need to change the cypher to match what you have in your settings (if, for exmaple you switched from the default of aes128

@mediaupstream
Copy link
Owner

Please let me know if that worked, or if I can help in any other way

@evhub
Copy link

evhub commented Nov 26, 2019

@mediaupstream I already had the change you just pushed on my local branch. I tried using openssl with -pbkdf2 directly like you suggested, though to no avail. I'm currently pretty puzzled about what the problem might be, so any ideas would be appreciated.

@mediaupstream
Copy link
Owner

mediaupstream commented Nov 27, 2019

are you sure that you used pbkdf2 when encrypting? perhaps try using openssl directly w/out the pbkdf2 flag

openssl enc -d -aes128 -base64 -pass "password here" -in encrypted-file.zip -out decrypted-file.zip

@mediaupstream
Copy link
Owner

also, ensure there are no extra trailing spaces or missing characters in your encrypted file

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

No branches or pull requests

4 participants