Re: cannot decrypt file symmetric encrypted

2018-08-07 Thread vedaal via Gnupg-users
On 8/2/2018 at 3:01 PM, "Dirk Gottschalk via Gnupg-users" 
 wrote:

>Am Donnerstag, den 02.08.2018, 14:11 +0200 schrieb Stefano
>Tranquillini:
>> Hi all,
>> last year I encrypted some files, today i tried to decrypt them 
>but
>> the
>> decryption fails
>
>> stefano@~/Downloads/words$ gpg -d words.1.gpg
>> gpg: AES256 encrypted data
>> gpg: encrypted with 1 passphrase
>> gpg: decryption failed: Bad session key

...

>Are you sure you used the correct passphrase to decrypt?

=

It was probably not the correct passphrase.
The error that gpg2 gives when entering the wrong passphrase for a 
symmetrically encrypted message is exactly:  

gpg: decryption failed: Bad session key


This is the same whether you are off for even 1 character of the passphrase, or 
even if you just press 'enter' without a passphrase at all.


Here is a sample symmetrically encrypted message:

-BEGIN PGP MESSAGE-
Version: GnuPG v1
Comment:  Passphrase: sss

jA0EBwMCPJYegoCPRBRg0jkBnZym0Pr+ggBpBJYtHlYJgf90SL6YbWa1vcbLdl7H
jwxeR5cIFoNhytyUIFxdvrLNP59qkqzLKkI=
=pHIB
-END PGP MESSAGE-


First enter the correct passphrase,  sss

gpg (V1 and V2)  decrypts it as is should be.


now enter just ss or anything except the correct passphrase, or just press 
enter, and you get:

gpg: decryption failed: bad key   (when using Version 1.4.x)

gpg: decryption failed: Bad session key  (when using Version 2.x)


(Something to do with the string-to-key formation.

When the passphrase is off, the 'key' generated from it, is wrong, and when 
that wrong 'key' is used to attempt decryption, 
gpg rightfully gives an error message that the 'key' is bad.

maybe worthy of a note in the FAQ ...  )


vedaal



___
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users


Re: cannot decrypt file symmetric encrypted

2018-08-06 Thread Andre Heinecke
On Monday, August 6, 2018 9:28:21 AM CEST Stefano Tranquillini wrote:
> i don't think that's the case. is there aa way to force the program to ask
> passphrase?

Try adding "--pinentry mode loopback" to your command. Maybe there is a 
problem with your installation / pinentry program so that it does not start or 
you are acidentally using a dummy / test pinentry which provides the wrong 
passphrase.

-- 
Andre Heinecke |  ++49-541-335083-262  | http://www.intevation.de/
Intevation GmbH, Neuer Graben 17, 49074 Osnabrück | AG Osnabrück, HR B 18998
Geschäftsführer: Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner

signature.asc
Description: This is a digitally signed message part.
___
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users


Re: cannot decrypt file symmetric encrypted

2018-08-06 Thread Stefano Tranquillini
i don't think that's the case. is there aa way to force the program to ask
passphrase?

On Fri, Aug 3, 2018 at 10:34 PM FuzzyDrawrings via Gnupg-users <
gnupg-users@gnupg.org> wrote:

> Stefano Tranquillini wrote:
>
> > the fact is that no passphrase is asked
>
> When you hit the Enter key after typing your decrypt command, it might
> also be closing the pinentry dialog immediately before it can appear on
> screen. Make sure you don't hold down the Enter key at all - just tap it
> once as briefly as possible.
>
> ___
> Gnupg-users mailing list
> Gnupg-users@gnupg.org
> http://lists.gnupg.org/mailman/listinfo/gnupg-users
>


-- 
Stefano
___
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users


Re: cannot decrypt file symmetric encrypted

2018-08-03 Thread FuzzyDrawrings via Gnupg-users
Stefano Tranquillini wrote:

> the fact is that no passphrase is asked

When you hit the Enter key after typing your decrypt command, it might also be 
closing the pinentry dialog immediately before it can appear on screen. Make 
sure you don't hold down the Enter key at all - just tap it once as briefly as 
possible.

___
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users


Re: cannot decrypt file symmetric encrypted

2018-08-03 Thread Stefano Tranquillini
the fact is that no passphrase is asked, and I don't know how I can force
the system to ask it.

On Thu, Aug 2, 2018 at 8:57 PM Dirk Gottschalk via Gnupg-users <
gnupg-users@gnupg.org> wrote:

> Hi.
>
> Am Donnerstag, den 02.08.2018, 14:11 +0200 schrieb Stefano
> Tranquillini:
> > Hi all,
> > last year I encrypted some files, today i tried to decrypt them but
> > the
> > decryption fails
>
> > stefano@~/Downloads/words$ gpg -d words.1.gpg
> > gpg: AES256 encrypted data
> > gpg: encrypted with 1 passphrase
> > gpg: decryption failed: Bad session key
>
> > can it be the difference between 1.4 (i guess in july 2017 that was)
> > and
> > the current one
>
> I don't now if there's any difference in symmetric encryption between
> 1.4.X and 2.2.X.
>
> > stefano@~/Downloads/words$ gpg --version
> > gpg (GnuPG/MacGPG2) 2.2.8
> > libgcrypt 1.8.3
>
> > what can I do?
> > (i'm on a mac)
>
> You could download and build the legacy version of GPG and give it a
> try.
>
> Are you sure you used the correct passphrase to decrypt?
>
> Regards,
> Dirk
>
> --
> Dirk Gottschalk
> Paulusstrasse 6-8
> 52064 Aachen, Germany
>
> GPG: DDCB AF8E 0132 AA54 20AB  B864 4081 0B18 1ED8 E838
> Keybase.io: https://keybase.io/dgottschalk
> GitHub: https://github.com/Dirk1980ac
>
> ___
> Gnupg-users mailing list
> Gnupg-users@gnupg.org
> http://lists.gnupg.org/mailman/listinfo/gnupg-users
>


-- 
Stefano
___
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users


Re: cannot decrypt file symmetric encrypted

2018-08-02 Thread Dirk Gottschalk via Gnupg-users
Hi.

Am Donnerstag, den 02.08.2018, 14:11 +0200 schrieb Stefano
Tranquillini:
> Hi all,
> last year I encrypted some files, today i tried to decrypt them but
> the
> decryption fails

> stefano@~/Downloads/words$ gpg -d words.1.gpg
> gpg: AES256 encrypted data
> gpg: encrypted with 1 passphrase
> gpg: decryption failed: Bad session key

> can it be the difference between 1.4 (i guess in july 2017 that was)
> and
> the current one

I don't now if there's any difference in symmetric encryption between
1.4.X and 2.2.X.

> stefano@~/Downloads/words$ gpg --version
> gpg (GnuPG/MacGPG2) 2.2.8
> libgcrypt 1.8.3

> what can I do?
> (i'm on a mac)

You could download and build the legacy version of GPG and give it a
try.

Are you sure you used the correct passphrase to decrypt?

Regards,
Dirk

-- 
Dirk Gottschalk
Paulusstrasse 6-8
52064 Aachen, Germany

GPG: DDCB AF8E 0132 AA54 20AB  B864 4081 0B18 1ED8 E838
Keybase.io: https://keybase.io/dgottschalk
GitHub: https://github.com/Dirk1980ac



signature.asc
Description: This is a digitally signed message part
___
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users


cannot decrypt file symmetric encrypted

2018-08-02 Thread Stefano Tranquillini
Hi all,
last year I encrypted some files, today i tried to decrypt them but the
decryption fails

stefano@~/Downloads/words$ gpg -d words.1.gpg
gpg: AES256 encrypted data
gpg: encrypted with 1 passphrase
gpg: decryption failed: Bad session key

can it be the difference between 1.4 (i guess in july 2017 that was) and
the current one

stefano@~/Downloads/words$ gpg --version
gpg (GnuPG/MacGPG2) 2.2.8
libgcrypt 1.8.3

what can I do?
(i'm on a mac)

-- 
Stefano
___
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users