[php] PGP-Verschluesselung von Formulardaten ab Server

[php] PGP-Verschluesselung von Formulardaten ab Server

=?iso-8859-1?Q?Bj=F6rn_Schotte?= bjoern_(at)
Tue, 2 Nov 1999 11:45:45 +0100


> IMHO reicht definitiv der Public-Key des Empfaengers - sonst

Nein. Zum Verschlüsseln mußt du stets dein Mantra mit angeben.

Ich hab aber gerade in der PGP FAQ einen interessanten Abschnitt
gefunden, wie das Problem dennoch gelöst werden kann:

The best, but also the most complicated way is using the PGPPASSFD environment variable.
This variable should contain a "file descriptor number" pointing to a file which contains
the passphrase. This will protect the passphrase from anyone but the superuser, if you
properly set the file's permissions. 

Thanks to Jack Gostl <gostl_(at)> for the following. 

   You can find something on this in the appnotes file in the pgp262 distribution.
   If you set PGPPASSFD to 0, pgp will read the passphrase from stdin as soon it starts. 

   echo "PassPhraseHere" | pgp -east file recipient1 recipient2..

Patrick J. LoPresti <patl_(at)> added: 

   You could also use funky shell redirection to make PGP get the passphrase from an
   arbitrary file. The exact command to define a variable depends on the shell; ksh
   and the likes use export PGPPASSFD=3, and csh and derivates use setenv PGPPASSFD 3. 

   setenv PGPPASSFD 3; pgp -eat file recipient 3 < /my/passphrase/file

This last example has the added advantage that standard input is still available to the user,
for example to answer Yes or No to certain questions. 

Björn Schotte                                09364/810492
PHP-Center                 -> <>
Virtuelle Postkartengrüsse ->  <>

php::bar PHP Wiki   -   Listenarchive