Re: New Package Proposal Crypt_PGP
| From: | Damian Alejandro Fernandez Sosa | Date: | Wed, 19 Mar 2003 12:11:03 +0000 |
| Subject: | Re: New Package Proposal Crypt_PGP | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-14439@lists.php.net to get a copy of this message | ||
On Wed, 2003-03-19 at 04:31, Christian Stocker wrote:
> Looks like a quite extensive class ;) I just quickly skimmed through it
> and there's one point I don't like. You store the decrypted plain text
> on disk. Looks not like a very good idea, especially when you run that
> on a server, on which more than one has access
This is a GNU PGP flaw not a class flaw.
GPG is prepared to put the private, public keys and the message (when
you create then ) in a disk file. As much as I see in the documentation
GPG dont write then to stdout, it writes to 2 files (one for the
private and other to the public key).
To bypass that flaw, each key is created in its own directory in the
temp system directory (or in the directory you want) and the permitions
of the newly created dir are set to deny access to that (700) file to
anybody else and after its use that directory (and the created files)
are deleted (anyway you can make the temp dir you want to use to have
111 permission so anybody - except root - can see the data inside while
that data is stored in disk)
I know that I forget to call _deleteTempDir() in some methods but this
is a bug that I'm going to solve it soon in the new release.
> (besides storing private
> PGP keys on a public webserver isn't a very bright idea at all ;) )
Private? not! the public key (the one you send to anybody)
This is a PGP PKI system this is a system to retrive the public key of
somebody if you don't have in a email
Anyway you store the _public_ _key_ in a keyserver _only_ if you call
putPublicKeyserver() method
> I don't know a proper solution for that. I used pipes back then, when I
> implemented something similar (but much less featurefull), but this had
> also some security issues...
>
Remember that GPG writes 2 files so I can't use a standar PIPE.
> chregu