Re: Questions regarding WKD/WKS
Am 02.12.22 um 14:59 schrieb Werner Koch: > On Thu, 1 Dec 2022 14:45, Andreas Heinlein said: > >> 1. If I follow the guidelines for creating the directory >> /var/lib/gnupg/wkd, it has ownership webkey:webkey and permissions >> 2750. So there ist no chance for the apache user to be able to read > That does not look right. You should have o+rx for the directories and > o+r for the files. If I do that, I get: gpg-wks-server: directory '/var/lib/gnupg/wks' has too relaxed permissions gpg-wks-server: Fix by running: chmod o-rw '/var/lib/gnupg/wks' This is gpg-wks-server version 2.2.27, as packaged with Debian 11. If this is a (known) bug, I may try to get it fixed. > >> suggested and I am submitting the key encrypted and signed with the > You should not sign the message. > >The key to be published MUST be submitted using a PGP/MIME encrypted >message ({{{RFC(3156)}}}, section 4). The message MUST NOT be signed >(because the authenticity of the signing key has not yet been >confirmed). > > I would also strongly suggest to use gpg-wks-client. Thanks, I overlooked that. I find it a little difficult to instruct normal users to configure their client to sign mails, but make an exception when submitting their mail to the wks. I cannot use gpg-wks-client here - our folks are using thunderbird. This is a known missing feature in thunderbird, WKS client support got lost when moving from Enigmail to their own implementation. See here: https://bugzilla.mozilla.org/show_bug.cgi?id=1695048 For the moment it would be nice if we could "stretch" the RFC a little and just ignore any signatures. Any way to achieve that, or would it be necessary to patch the wks server? > >> gpg-wks-server: gpg: armor header: Version: GnuPG v1.4.11 (GNU/Linux) > GnuPG 1.4 - really? Don't do this. And in particialr not a 12 year old > version. Yeah, I know. This was from an old testing machine, I wouldn't do that in real life ;-) > >> 3. What is the behaviour when the WKS server receives a key for an >> address for which it already has a (different) key? Will it replace >> the old key, will it refuse or ignore the new one? > The old key will be replaced after the confirmation has been received. That's what I expected. Thank you, Andreas___ Gnupg-users mailing list Gnupg-users@gnupg.org https://lists.gnupg.org/mailman/listinfo/gnupg-users
Questions regarding WKD/WKS
Hello, I am trying to implement WKD/WKS and followed the tutorial here: https://wiki.gnupg.org/WKS I have a few questions: 1. If I follow the guidelines for creating the directory /var/lib/gnupg/wkd, it has ownership webkey:webkey and permissions 2750. So there ist no chance for the apache user to be able to read anything within that directory. I could solve that by adding the apache user to the webkey group. Is that the intended solution? 2. I am stuck when submitting a key to the submission address for confirmation. I have created a key for the submission address as suggested and I am submitting the key encrypted and signed with the key I am submitting. On the server side, gpg-wks-server fails when trying to decrypt the key because it cannot verify the signature: gpg-wks-server: t2body for level 0 gpg-wks-server: t2body for level 1 gpg-wks-server: t2body for level 1 gpg-wks-server: gpg: armor header: Version: GnuPG v1.4.11 (GNU/Linux) gpg-wks-server: gpg: public key is *** gpg-wks-server: gpg: using subkey *** instead of primary key *** gpg-wks-server: gpg: public key is *** gpg-wks-server: gpg: encrypted with ELG key, ID *** gpg-wks-server: gpg: using subkey *** instead of primary key *** gpg-wks-server: gpg: encrypted with 3072-bit RSA key, ID ***, creat ed 2022-11-30 gpg-wks-server: gpg: "schluessel@***.de" gpg-wks-server: gpg: AES256 encrypted data gpg-wks-server: gpg: original file name='' gpg-wks-server: gpg: Signature made Wed Nov 30 12:27:14 2022 CET gpg-wks-server: gpg: using DSA key *** gpg-wks-server: gpg: Can't check signature: No public key gpg-wks-server: error running '/usr/bin/gpg': exit status 2 gpg-wks-server: decryption failed: General error gpg-wks-server: parsing decrypted message gpg-wks-server: no suitable data found in the message gpg-wks-server: command failed: No data There's obviously no chance verification could succeed. How can I turn this off? I tried creating /home/webkey/.gnupg/gpg.conf and adding "skip-verify" to it. This works on the command line, but has no effect on gpg-wks-server. 3. What is the behaviour when the WKS server receives a key for an address for which it already has a (different) key? Will it replace the old key, will it refuse or ignore the new one? Thanks, Andreas ___ Gnupg-users mailing list Gnupg-users@gnupg.org https://lists.gnupg.org/mailman/listinfo/gnupg-users
Re: Automating and integrating GPG
Am 20.09.2017 um 09:02 schrieb Werner Koch: > On Mon, 18 Sep 2017 23:45, d...@fifthhorseman.net said: > >> I don't know how much smartcard interaction gpgme supports, though. > Everything you need. Have a look at GPA's smartcard features. I assume > it is the most advanced GUI to handle the OpenPGP card as well as > several other cards. For example it includes full support for the > Telesec card with their NullPIN feature. Interesting. I haven't found anything smartcard related in the GPGME docs. I am really not good at C, but I took a look at the sources of GPA, specifically the change_pin function in cm-openpgp.c, and it looks like GPA is using assuan protocol through gpgme here: char command[100]; snprintf (command, sizeof command, "SCD PASSWD%s %d", reset_mode? " --reset":"", pinno+1); err = gpgme_op_assuan_transact_ext (gpgagent, command, NULL, NULL, NULL, NULL, NULL, NULL, &operr); I hadn't thought of that possibility. Python-GPG should support this, too - take a look at assuan.py in the examples folder. But I haven't yet found any documentation of the assuan commands you need here. This probably isn't as easy as a Python programmer might expect... Andreas signature.asc Description: OpenPGP digital signature ___ Gnupg-users mailing list Gnupg-users@gnupg.org http://lists.gnupg.org/mailman/listinfo/gnupg-users
Re: Automating and integrating GPG
Am 18.09.2017 um 23:45 schrieb Daniel Kahn Gillmor: > I don't know how much smartcard interaction gpgme supports, though. None, as it seems. I have started developing with python-gpg and gpgme some weeks ago, but haven't yet done anything with smartcards yet. But as far as I can tell from the docs, gpgme completely hides the internals of key storage, to gpgme it doesn't matter whether the key is located on disk or stored in a smartcard or token. Having said that, I must say that your goal is somewhat difficult to achieve. Handling of the passphrase is about one of the most sensitive tasks when dealing with encryption. I currently can think of no way you could handle passphrases on your own in python which I would call 'secure'. Don't pass it on the command line to a gpg subprocess, that will be readable in the process list for everyone. But even if you pass it along with e.g. gpgme, it might be possible to read the memory of that python process and steal the passphrase. That part of the memory might also be swapped out. Read the relevant part of the FAQ: https://www.gnupg.org/faq/gnupg-faq.html#insecure_memory Furthermore, for me one of the best reasons for using smartcards is that you don't enter the PIN/passphrase on the (potentially compromised) computer at all, but use a class 2 or 3 smartcard reader for that. Using a class 1 reader and juggling around the PIN in scripts defeats 50% of the purpose of a smartcard to me (the other 50% being that you can't copy the secret key from the card, this stays untouched). I guess you just have no choice when you say you are "required to", but keep that in mind. If you must use python and cannot use gpgme, your best bet might be to write the passphrase out to a file which only you can read, and pass it to the gpg command line using '--passphrase-file' or "--passphrase-fd'. You will need to trust root on that machine in any case. Andreas signature.asc Description: OpenPGP digital signature ___ Gnupg-users mailing list Gnupg-users@gnupg.org http://lists.gnupg.org/mailman/listinfo/gnupg-users
System-wide gnupg.conf?
Hello, after reading today's announcement of GNuPG 2.1.23, I had the idea of having a system-wide /etc/gnupg.conf, to disable the new auto-key-retrieve etc. User's gnupg.conf should still be used and override the same options in the system-wide conf. Has something like this ever been discussed? Bye, Andreas signature.asc Description: OpenPGP digital signature ___ Gnupg-users mailing list Gnupg-users@gnupg.org http://lists.gnupg.org/mailman/listinfo/gnupg-users
Re: How to use a the same generated keypair on enigmail/thunderbird and iOS Mail
Am 26.07.2017 um 14:05 schrieb dekkz...@gmail.com: > On 07/26, Andreas Heinlein wrote: >> Am 26.07.2017 um 11:27 schrieb MFPA: >>> Do "most normal users" make use of an OpenPGP smartcard? Those that do >>> might be able to use the same keypair on their mobile phone by means >>> of an NFC-enabled smartcard. >> Surely not. I guess most "normal users" don't even know that such a >> thing exists. >> >> Besides that, AFAIK the NFC-functionality on several SmartCards is not >> for use with OpenPGP, it's just there for additional purposes with other >> applications. >> >> Bye, >> Andreas >> > > When you say not for use with OpenPGP, do you mean most "smartcards" > marked as SLE4442 compatible won't work with GnuPG? Actually the one OpenPGP smartcard I know of is sold by FLOSS-Shop (ex-kernel-concepts): https://www.floss-shop.de/de/security-privacy/smartcards/4/openpgp-smart-card-v2.1-mifare-desfire?c=41 This one has an NFC chip but which is not for use with OpenPGP. There may be other smartcards out there which can also be used with GnuPG but they're usually not called "OpenPGP card". Andreas signature.asc Description: OpenPGP digital signature ___ Gnupg-users mailing list Gnupg-users@gnupg.org http://lists.gnupg.org/mailman/listinfo/gnupg-users
Re: How to use a the same generated keypair on enigmail/thunderbird and iOS Mail
Am 26.07.2017 um 11:27 schrieb MFPA: > Do "most normal users" make use of an OpenPGP smartcard? Those that do > might be able to use the same keypair on their mobile phone by means > of an NFC-enabled smartcard. Surely not. I guess most "normal users" don't even know that such a thing exists. Besides that, AFAIK the NFC-functionality on several SmartCards is not for use with OpenPGP, it's just there for additional purposes with other applications. Bye, Andreas signature.asc Description: OpenPGP digital signature ___ Gnupg-users mailing list Gnupg-users@gnupg.org http://lists.gnupg.org/mailman/listinfo/gnupg-users
Re: How to use a the same generated keypair on enigmail/thunderbird and iOS Mail
Am 25.07.2017 um 20:34 schrieb Robert J. Hansen: >> I would think you could transfer the private key file to the moblle >> device by bluetooth, or by using a USB cable, or by email. So long as >> the private key is protected by a decent passphrase, anybody else >> getting a copy of the file should be of no consequence. > This is correct. > > I've often volunteered to publish my private key in the _New York > Times_, if someone will just pay for the listing. With a strong > passphrase, private keys are pretty darn safe against casual snooping. I still would not recommend that to non-technical people. While the users on this list probably know what a 'decent' passphrase is, most normal users don't. They tend to choose passwords which are too short, contain dictionary words - or they are written down right under the keyboard... Having a second line of defense, i.e. keeping the private key secure, is usually a good idea. That's the whole point of the OpenPGP smartcard, after all. Andreas signature.asc Description: OpenPGP digital signature ___ Gnupg-users mailing list Gnupg-users@gnupg.org http://lists.gnupg.org/mailman/listinfo/gnupg-users
Re: A Quick Supplement
Am 18.07.2017 um 15:36 schrieb Robert J. Hansen: > >> While it would be nice if it were easier to be able to back up easily >> as you're suggesting, shouldn't the focus of GnuPG be on security? > This *is* a security issue. > > Some versions of GnuPG use a file called "random_seed", for instance. > This file contains material for seeding a random number generator, and > for that reason it must not be backed up or shared between computers: if > the file doesn't exist it'll be recreated, but if it does... then you've > just reused RNG seeds on two different computers, which has the > potential to dramatically reduce the cryptographic security of the code. > > If you don't make it easy to back up keys, people won't back up their > keys. Then, any minor disaster has the possibility of irreparably > wrecking their keys and the Web of Trust connections they've carefully > created. Disaster recovery is an important part of security, too. Sorry if I'm asking dumb questions, but given that a) I am using the same GnuPG version on all machines and b) I am excluding random_seed, what would be wrong with sync'ing the whole gnupg directory (or the whole user profile / home directory) with rsync/duplicity/whatever ? Also, can you point me to a more in-depth explanation on the security implications of re-using random_seed? I can imagine what you mean, but I'd like to know more. Thanks, Andreas signature.asc Description: OpenPGP digital signature ___ Gnupg-users mailing list Gnupg-users@gnupg.org http://lists.gnupg.org/mailman/listinfo/gnupg-users
Re: use policy of the GnuPG-card
Am 13.07.2017 um 13:44 schrieb Andrew Gallagher: > On 2017/07/13 11:49, Matthias Apitz wrote: >> One problem comes obviously in mind: Someone with priv access to your >> workstation, >> for example IT personal, could relatively easy steal your passwords, just >> setting your >> environment and waiting for the moment that you have unlocked the card with >> the PIN; >> than he/she could run as root: > *snipped evil plan* > > Worse than that, they can keylog your PIN and use that to perform > unlimited crypto operations using your smartcard whenever they detect it > is plugged in. Or they can read decrypted passwords out of memory, or > replace gpg with a version that copies everything it touches to a > network connection. The possibilities are literally endless. >> How is this supposed to be managed? > Don't plug your smartcard into a computer that someone else has root > access to. That's not flippant, that's the best you can do in principle. > Smartcards can protect you against disclosure of your secret key, but > not of data encrypted to that key. If you want to protect all the data > encrypted by that key, then you still need to take all the precautions > that you need to with any other method of secret key storage, and that > means (amongst other things) don't decrypt your data on an untrusted > machine. > > Remember, if someone else has root on your computer then it isn't your > computer - it's theirs. > > A +1 for that. If one can install software on a machine, one can completely take it over. No way to prevent that. For a private machine, you could encrypt the whole hard drive, making attacks on the OS level require physical access two times: once for installing a compromised boot loader that intercepts the password and once again for decrypting the drive with the stolen password and compromising the OS. With physical access, there are still attack vectors using firmware or hardware manipulation which also work with physical access only once. Andreas signature.asc Description: OpenPGP digital signature ___ Gnupg-users mailing list Gnupg-users@gnupg.org http://lists.gnupg.org/mailman/listinfo/gnupg-users
Re: Questions using GPGME
Am 13.07.2017 um 09:27 schrieb Werner Koch: > On Thu, 6 Jul 2017 14:48, aheinl...@gmx.com said: > >> decrypt with cancel'ing the pinentry, one with missing private key and >> one with a truncated input file. All three gave >> >> print str(e): Invocation of gpgme_op_decrypt_verify: GPGME: Decryption >> failed > This has been fixed yesterday in GPGME. You will now get back a > dedicated error code for "No secret keys", "Bad passphrase", and > "Canceled". You need to wait for the releale of 1.9.1, though. > > > I know, I filed the bug report ;-) Thanks again. Andreas signature.asc Description: OpenPGP digital signature ___ Gnupg-users mailing list Gnupg-users@gnupg.org http://lists.gnupg.org/mailman/listinfo/gnupg-users
Re: Option to select "Which topic categories would you like to subscribe to?" under Gnupg-users Subscription Options
Am 06.07.2017 um 14:50 schrieb S via Gnupg-users: > Hello, > > Apologies for having to ask this. Didn't find any options in the > relevant page. > > I would like to receive messages only for topics I'm subscribed to. > But, I don't see an option to select topics of my choice either in > "/Gnupg-users mailing list membership configuration/" page or in the > concerned mailing lists page "/https://lists.gnupg.org/pipermail//";. > * > * > Iwould like to know where I can select topics for message filtering. > As of now, I receive every mail transacted under the chosen mailing list.* > * > * > * > Thanks *I don't think the mailing list software could handle this. Thunderbird can ignore and hide topics, so you would have to 'opt-out' of every new topic. Bye, Andreas * signature.asc Description: OpenPGP digital signature ___ Gnupg-users mailing list Gnupg-users@gnupg.org http://lists.gnupg.org/mailman/listinfo/gnupg-users
Re: Questions using GPGME
Am 06.07.2017 um 14:01 schrieb Justus Winter: >> 2.) Is there a way to safely distinguish "User clicked cancel when asked >> for the passphrase" from other errors? I think an application should >> abort silently in this case, but I'm getting another GPGMEError without >> any clue to the reason. > Maybe. GPGMEError is a very general error, this is a bit of pyme > legacy. You can inspect the error code using .getcode(). For a quick > check, try to str() the error. Thank you for the quick answer. I gave it a try with 3 tests, one decrypt with cancel'ing the pinentry, one with missing private key and one with a truncated input file. All three gave print str(e): Invocation of gpgme_op_decrypt_verify: GPGME: Decryption failed print e.getcode(): 152 So this doesn't help. But good to know someone is working on this; I'd be happy to help where I can. I am not a C developer, though, but I could test if neccessary. Bye, Andreas signature.asc Description: OpenPGP digital signature ___ Gnupg-users mailing list Gnupg-users@gnupg.org http://lists.gnupg.org/mailman/listinfo/gnupg-users
Questions using GPGME
Hello, I am currently taking first steps using GPGME with the Python interface. I am facing two questions: 1.) I'm looking for a way to get the recipients of encrypted data which I can not/do not want to decrypt. I.e. a message for which I do not have the private key. Enigmail tells me "This message was encrypted for ..." in such cases, and the gpg command line does the same. Is this possible with GPGME? Calling 'decrypt' just raises a GPGMEError in this case and does not return a result. 2.) Is there a way to safely distinguish "User clicked cancel when asked for the passphrase" from other errors? I think an application should abort silently in this case, but I'm getting another GPGMEError without any clue to the reason. I wonder if these are just problems with the python interface or if the functionality is missing from libgpgme. I am currently using gpgme 1.8.0 because that's what is packaged with Debian 9, but if you tell me I need to upgrade, I will ;-) Thanks, Andreas signature.asc Description: OpenPGP digital signature ___ Gnupg-users mailing list Gnupg-users@gnupg.org http://lists.gnupg.org/mailman/listinfo/gnupg-users
Re: Working with a system-shared keyring
Am 02.06.2011 00:41, schrieb Dan McGee: > So my questions are: > 1. Does anyone else have experience with a shared among users keyring? > 2. What is best/secure practice when it comes to this? Outside of > --lock-never, yum does something that seems silly, but works- make a > user-owned copy of the entire keyring directory and then uses that. > 3. gpgme doesn't allow us to bypass the trustdb.gpg locking; is there > any possibility of allowing gpgme to run with --lock-never in a > read-only mode? > I'd try not relocating the homedir, but only the keyring location. If you have a means of distributing a gpg.conf to everyone's home directory, you could insert no-default-keyring keyring /etc/pacman.d/gnupg Not sure about the secret keyring, though. It should not try to use ~/.gnupg/secring.gpg, so trying to import a secret key or generate a new one should give an error. I assume that's what you intend. A home directory with wrong permissions and/or read-only is granted to give problems with various applications. Bye, Andreas ___ Gnupg-users mailing list Gnupg-users@gnupg.org http://lists.gnupg.org/mailman/listinfo/gnupg-users
Re: I can't stop encryption being done with a wrong key
Am 26.05.2011 21:26, schrieb Charly Avital: > In Thunderbird, key usage is set in 'Per Recipient rules', that is not > the Address Book. >> > >> > Can someone please explain to me how this could be happening, and what I >> > need >> > to do to correct it? Should I remove his old key from my keyring? If I >> > do, I >> > assume that I won't be able to read his older messages. > You don't have to remove his "old" public key from your keyring. > > You have to edit "Per Recipient Rules" so that your friend's new public > key (in your public keyring) is linked to his User ID (e-mail address), > and used to encrypt to him. Thunderbird (or the enigmail extension you're most likely speaking of) uses the mail addresses on the keys UID to choose which key to use. If there is more than one key with the same mail address on the keyring, engimails behaviour becomes somewhat unpredictable and sometimes chooses the old key, sometimes the new one. You could either override it with explicit recipient rules, or remove the old key from the keyring. Since you said the old key became "corrupt", I see no point in keeping it anyway. Andreas ___ Gnupg-users mailing list Gnupg-users@gnupg.org http://lists.gnupg.org/mailman/listinfo/gnupg-users
Re: Problem with the pgp to gpg key migration
Am 09.05.2011 14:43, schrieb Pramod.R: > > Hi, > > > > I tried migrating the public and the private key from the pgp(6.5.8) > keyring to the gpg(1.4.11) by following the below commands: > > > 1) Tried exporting the private and the public key from pgp using > the commands: > > pgp -kx " " pubkey.pgp > > pgp -kx " " sec.pgp ~/.pgp/secring.skr > > > > 2) Tried importing these two keys into the gpg using the below > commands: > > gpg --import pubkey.pgp > > gpg --allow-secret-key-import --allow-non-selfsigned-uid --import sec.pgp > > > First of all, it is not always necessary to "migrate" keyrings. Renaming then to pubring.gpg resp. secring.gpg and putting them in ~/.gnupg (under Unix) or wherever your GPG keyrings go, should work. If for some reason that doesn't work for you, you can also try importing the two PGP keyrings directly, with gpg --import pubring.pkr/secring.skr. "--allow-secret-key-import" is obsolete, as the man page states. > > 3) When I tried comparing the pgp keyring with the newly created > gpg keyring (using the commands: gpg --list-key), I found that all the > keys have been migrated except two of my self-generated pgp keys. > For the secret keys to show up, that should be --list-secret-keys, IIRC. > > 4) When I also tried encrypting a plain text using pgp using my > self-created pgp and then decrypting this using the gpg (after > migrating the keyring as explained above), I got an error saying that > gpg: decryption failed: secret key not available, which obviously > because I cannot see my own keys in the new gpg keyring. > > > Please let me know if I'm missing anything here. Also do let me know > if the above problem makes any sense or if you would need any other > information. > > When importing secret keys, you need to manually set owner trust in GPG or import the trust values as well with --import-ownertrust. That should not affect decrypting, though. Bye, Andreas ___ Gnupg-users mailing list Gnupg-users@gnupg.org http://lists.gnupg.org/mailman/listinfo/gnupg-users
Re: Best practice for periodic key change?
Am 05.05.2011 22:10, schrieb Doug Barton: > On 05/04/2011 23:52, Andreas Heinlein wrote: >> We have a OpenPGP key which we use for signing our software releases. >> That key should be changed yearly and carry an expiration date to >> enforce this change. > > What are you trying to accomplish by doing it this way? I've yet to > see a good rationale for setting expiration dates on keys, but perhaps > you can be the first. :) > > Well, there are several reasons. The first is that there is always the chance that the key is cracked brute-force. Remember that the x-zillion years which are often cited are only an average. One might always be lucky and find the right one within the first 0.0001% of keyspace, taking only a few days or weeks. Chance is very low, but then almost every week someone wins the lottery... ;-) More likely your key gets compromised some other way, e.g. it is stolen from your computer by a trojan, a malicious website or whatever. A good passphrase mitigates this risk somewhat, but most people choose passphrases which are weaker and easier to brute-force than the actual key. Here comes the third point; even if you notice your key was compromised, you need to revoke it *and* make sure the revocation reaches all users of your key. Like Werner said, many people never refresh their keys, so expiring is indeed a way to force them to do that. ( I admit that, in our case, even this will not help, since gpg will happily verify a signature made by an expired key. It will tell you that it's expired, but verify anyway. The 'hard' way would be to just refuse to do anything with an expired key or even delete it automatically, but that's another discussion). Much depends on the use case you're using GPG for, there's another discussion currently on this topic. Werner's approach still doesn't satisfy me, as it doesn't protect you from someone else using your (compromised) key as long as you don't notice it. Andreas ___ Gnupg-users mailing list Gnupg-users@gnupg.org http://lists.gnupg.org/mailman/listinfo/gnupg-users
Best practice for periodic key change?
Hello, I hope you can give me some advice on the following problem: We have a OpenPGP key which we use for signing our software releases. That key should be changed yearly and carry an expiration date to enforce this change. However, for the signatures to be useful, the key has to be signed by quite a lot of well-known people and institutions, which means a considerable effort. If we just regenerate the whole key every year, we would have to get all these signatures again. I have a feeling that generating new subkeys might be a solution, but I have never worked with subkeys before, so I thought you could give me some advice what would be the best thing to do. Thanks, Andreas ___ Gnupg-users mailing list Gnupg-users@gnupg.org http://lists.gnupg.org/mailman/listinfo/gnupg-users
Re: cloudy understanding of asymmetric cryptography
Felipe Alvarez schrieb: > On Thu, Mar 26, 2009 at 8:17 PM, Sven Radde wrote: > >> Hi! >> >> Felipe Alvarez schrieb: >> >>> Someone today shook my understanding of asymmetric ciphers. >>> >>> _Bob performs symmetric encryption on message with_ >>> _key "K" (generated randomly). He then encrypts "K" _ >>> _with Alice's public key, and sends both the symetrically _ >>> _encrypted message and asymmetrically encrypted key to Alice_ >>> >>> Is this what happens during most/some/all of public-key >>> communications? >>> >> Yes. It's called a "hybrid cryptosystem" and is exactly what is done in >> virtually all practical implementations (SSL, OpenPGP, ...). >> The main reason is that asymmetric operations are hugely inefficient so >> that you do not want to encrypt 1GB of data with RSA. >> >> Another reason: "K" could be separately encrypted with Alice's, Bob's >> and Carol's key which allows several recipients for an encrypted message >> without having to encrypt the message itself several times I think the latter is the more important point nowadays. I do not believe doing complete RSA encryption would take too long on modern hardware for reasonable file sizes. But if you encrypted a file of 10MB to 10 recipients this way, it would become around 100MB in size. > I learned a lot thanks for explaining it so quickly and easily. I had > thought that the entire message was encrypted with (say) RSA! Is there > a way to "force" gpg to encrypt an entire message with (example) RSA > (just for time-testing purposes?) > Felipe No, I don't think that's possible. Bye, Andreas ___ Gnupg-users mailing list Gnupg-users@gnupg.org http://lists.gnupg.org/mailman/listinfo/gnupg-users
Re: Elementary Question
Jorge Luis schrieb: > I've googled and checked the docs for an answer to this, but have come > up empty-handed. > > Is it possible to verify public keys without actually adding them to my > keyring? For example, I don't want to add keys from mailing lists under > most circumstances, but I would like to retreive the correspondent's key > and verify it. On the other hand, I'd like to add the key from > correspondence with private parties to my keyring. I can configure mutt > to retrieve selected keys only, but the process always adds the key to > my keyring. I'd like to do a "provisional" check of the key if it's > attached to a mailing list message, without adding it to the keyring. > > I hope my question makes sense. Thank you for any suggestions Hello, I doubt this is possible, but it is possible to use multiple keyrings with gnupg using the --keyring option and set the one to import new keys to with the --primary-keyring option. This way, you could have a separate keyring for mailing list keys or you could just use a temporary keyring which you delete afterwards. Bye, Andreas ___ Gnupg-users mailing list Gnupg-users@gnupg.org http://lists.gnupg.org/mailman/listinfo/gnupg-users
Re: appending to gpg file?
David Shaw schrieb: > On Mon, Nov 17, 2008 at 02:41:50PM -0500, David Kennedy wrote: > >> Thanks for the help! >> >> I'm using an app to pipe events (text strings) through an instance of gpg to >> a file. This works great for me now, in an ideal environment. >> >> Two issues: >> 1)The problem occurs if/when the app breaks, breaking the pipe and killing >> my stream. GPG terminates, and the resulting file is unreadable (i get an >> error decrypting it after entering in the passphrase). so, the whole log is >> no good. >> >> 2)Then, what if i'd like to start the app again, and stream back to the same >> file? >> >> My thought is to individually encrypt each "line" in the output file as its >> own gpg encrypted package. No dependencies on other individual "lines" not >> being corrupt, as long as some sort of delimiter is in place. >> > > (please don't top-post) > > Do this: > > echo "my log line" | gpg --armor >> my_log_file.txt > > (Use whatever gpg options you like. The important bit is that you > have --armor in there) > > You will end up with a log file that looks like this: > > -BEGIN PGP MESSAGE- > (Lots of base64 stuff) > -END PGP MESSAGE- > -BEGIN PGP MESSAGE- > (Lots of base64 stuff) > -END PGP MESSAGE- > -BEGIN PGP MESSAGE- > (Lots of base64 stuff) > -END PGP MESSAGE- > > and so on. To decrypt, split up the file so that each BEGIN/END pair > is in its own file, and decrypt that. > > Note this is a pretty space-inefficient way to store things, but it > does answer your question of how to do it. There might be a better > way to solve the original problem, but I'm not sure what what is from > your email. > > >From what he wrote, this looks like it could be solved better with filesystem encryption like eCryptfs or encrypted loopback/dm_crypt/TrueCrypt/etc. That would imply, however, that access to the file/volume can be restricted securely as long as it's open. Bye, Andreas ___ Gnupg-users mailing list Gnupg-users@gnupg.org http://lists.gnupg.org/mailman/listinfo/gnupg-users