Re: Finding all files encrypted with a certain key

2023-10-26 Thread raf via Gnupg-users
On Wed, Oct 25, 2023 at 09:38:55PM -0500, Jacob Bachmeyer via Gnupg-users 
 wrote:

> raf via Gnupg-users wrote:
> > [...]
> > While testing these, I just noticed that /usr/bin/file
> > on my macOS-10.14 laptop shows a different keyid to
> > what libmagic shows. That's bizarre.
> > 
> > For some encrypted files of mine, /usr/bin/file (v5.33)
> > shows 3A0FC449 817C22BA but libmagic/rh shows 49C40F3A
> > BA227C81 for the same files. A more recent version of
> > file (v5.45) installed via macports shows the same as
> > libmagic/rh. So choose your version of file(1) wisely. :-)
> 
> You have an endianness-mismatch issue somewhere.  The octets are reversed in
> each 32-bit group between the samples.
> 
> -- Jacob

Well spotted! Thanks. The actual endianness wouldn't have changed,
but file's presentation of it much have been fixed (to match
gpg output) between those versions.

cheers,
raf


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


Re: Finding all files encrypted with a certain key

2023-10-26 Thread raf via Gnupg-users
On Thu, Oct 26, 2023 at 11:29:38AM +0800, "Felix E. Klee"  
wrote:

> On Wed, Oct 25, 2023 at 9:23 PM Werner Koch  wrote:
> > > gpg: decryption failed: No secret key
> > >
> > > I wonder how to get rid of that.
> >
> > grep -v on stderr ;-).
> 
> Thanks, I was thinking about that. But I think simply using find, as
> suggested by Andrew and raf, is sufficient and simple.

rh intead of find+n*(sh+file+grep) is even simpler (but I'm biased). :-)

> > I think it is time to make things like this easier. Actually
> > re-encrypt support has been on our feature list for many years.
> 
> That would be fancy. Personally, I’m happy with a bit of shell
> scripting. My use case is rather simple, and I don’t need to do
> re-encryption very often.

Yeah. I think gpg -d ... | gpg -e -r ... is simple enough. I use that
(in a "recrypt" python script) for annual key rollover re-encryptions
of many database backups.

cheers,
raf


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


Re: Pinentry problem with different home dir

2023-10-26 Thread Steffen Nurpmeso
Werner Koch via Gnupg-users wrote in
 <87r0lhzxgu@jacob.g10code.de>:
 |On Wed, 25 Oct 2023 18:51, Michael Richardson said:
 ...
 |Use a different home directory.  Actually running
 |  gpg --homedir /somewhere -s something
 |should be enough but the agent and dirmngr started on the fly won't be
 |killed until you rmdir /somewhere.

It would really be nice if one would be able to avoid those extras
for simple operations.  It is one reason why i still use 1.4.23,
all those surroundings that i really do not need (unless i would
need them), and that get auto-started and are then laying around.

Other than that it justs works here, with three different
homedir's (pgp with "mutilated" non-exportable etc. private key --
thanks again for this non-standard but super user helpful
possibility!, pgp-nosecrets with only the public key for
encryption, and then the usually non-available full thing.
Works for years without any issues at all.

 |Or just use -u to select a different signing key.  For example in
 |~/.gitconfig
 ...
 |[user]
 |  name = "Werner Koch"
 |  email = "w...@gnupg.org"
 |  signingkey = C1D34B69219E4AEEC0BA1C21E3FDFF218E45B72B

I did not know it even works with quotes.  Never used quotes here.

--steffen
|
|Der Kragenbaer,The moon bear,
|der holt sich munter   he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)

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


Re: Pinentry problem with different home dir

2023-10-26 Thread Falko Strenzke

Hi Ingo,

actually I could solve the problem now by placing the gpg-agent.conf 
with the specification of the pinentry program into the folder I specify 
as GNUPGHOME. I still don't understand why this is necessary, as my 
normal home directory doesn't contain this file. But it is working for 
me now.


- Falko

Am 26.10.23 um 10:35 schrieb Ingo Klöcker:

On Mittwoch, 25. Oktober 2023 13:01:39 CEST Falko Strenzke wrote:

I am trying to run GnuPG with a different home directory by setting the
environment variable GNUPGHOME. However, in that case, for instance when
trying to generate a key, in that case I get the error

gpg: DBG: chan_4 <- ERR 67108949 No pinentry 
gpg: agent_genkey failed: No pinentry
Key generation failed: No pinentry

I'm wondering why you have problems with something that I'm using almost daily
while working on Kleopatra. I do
GNUPGHOME=/somewhere gpg ...
or
GNUPGHOME=/somewhere kleopatra ...
all of the time.

I think you need to tell us the commands you are using. And the output of
`gpg --version`.

Regards,
Ingo

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

--

*MTG AG*
Dr. Falko Strenzke
Executive System Architect

Phone: +49 6151 8000 24
E-Mail: falko.stren...@mtg.de
Web: mtg.de 




MTG AG - Dolivostr. 11 - 64293 Darmstadt, Germany
Commercial register: HRB 8901
Register Court: Amtsgericht Darmstadt
Management Board: Jürgen Ruf (CEO), Tamer Kemeröz
Chairman of the Supervisory Board: Dr. Thomas Milde

This email may contain confidential and/or privileged information. If 
you are not the correct recipient or have received this email in error,
please inform the sender immediately and delete this email. Unauthorised 
copying or distribution of this email is not permitted.


Data protection information: Privacy policy 



smime.p7s
Description: Kryptografische S/MIME-Signatur
___
Gnupg-users mailing list
Gnupg-users@gnupg.org
https://lists.gnupg.org/mailman/listinfo/gnupg-users


Re: Pinentry problem with different home dir

2023-10-26 Thread Ingo Klöcker
On Mittwoch, 25. Oktober 2023 13:01:39 CEST Falko Strenzke wrote:
> I am trying to run GnuPG with a different home directory by setting the
> environment variable GNUPGHOME. However, in that case, for instance when
> trying to generate a key, in that case I get the error
> 
> gpg: DBG: chan_4 <- ERR 67108949 No pinentry 
> gpg: agent_genkey failed: No pinentry
> Key generation failed: No pinentry

I'm wondering why you have problems with something that I'm using almost daily 
while working on Kleopatra. I do
GNUPGHOME=/somewhere gpg ...
or
GNUPGHOME=/somewhere kleopatra ...
all of the time.

I think you need to tell us the commands you are using. And the output of  
`gpg --version`.

Regards,
Ingo


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


Re: Pinentry problem with different home dir

2023-10-26 Thread Werner Koch via Gnupg-users
On Wed, 25 Oct 2023 18:51, Michael Richardson said:

> The gpg-agent dependancy that came a few years ago has really been a PITA.

a few years = 20 years [1]

> I would really like some way to tell GPG that it really needs to ignore all
> of *my* (personal) setup, because I'm wearing a different personality now.

Use a different home directory.  Actually running
  gpg --homedir /somewhere -s something
should be enough but the agent and dirmngr started on the fly won't be
killed until you rmdir /somewhere.

Or just use -u to select a different signing key.  For example in
~/.gitconfig

--8<---cut here---start->8---
[user]
  name = "Werner Koch"
  email = "w...@gnupg.org"
  signingkey = C1D34B69219E4AEEC0BA1C21E3FDFF218E45B72B
[commit]
 gpgsign
--8<---cut here---end--->8---


Salam-Shalom,

   Werner



[1] "Noteworthy changes in version 1.9.0 (2003-08-05)"

-- 
The pioneers of a warless world are the youth that
refuse military service. - A. Einstein


openpgp-digital-signature.asc
Description: PGP signature
___
Gnupg-users mailing list
Gnupg-users@gnupg.org
https://lists.gnupg.org/mailman/listinfo/gnupg-users