Encrypting / decrypting without importing keys?
atom at suspicious.org
Mon Oct 4 22:57:11 CEST 2004
-----BEGIN PGP SIGNED MESSAGE-----
> I'm new to GnuPG and was wondering if it was possible to encrypt and/or
> decrypt without needing to first import the keys into gpg. I'm looking
> to use gpg to encrypt data from a web page, where the user specifies the
> public key to encrypt data, and then eventually a private key to decrypt
> Additionally, is there anyway I can specify the keys to use as coming
> from standard in or standard out instead of being file based?
you can save a key into a file and use something like:
gpg --no-default-keyring --keyring key-file --trust-model always -ear user
this hack allows an encryption key to be used without importing it. how to
convert an ascii key into a binary key is an exercise i leave to the
reader; it isn't that hard to do but an ascii key won't work.
also, see if <http://business-php.com/opensource/gpg_encrypt/> does most
of what you need. it sounds like you'd have to tweak this, but the major
work is done.
PGP key - http://atom.smasher.org/pgp.txt
762A 3B98 A3C3 96C9 C6B7 582A B88D 52E4 D9F5 7808
"The sum of intelligence on the planet is a constant.
The population is increasing."
-- Cole's Axiom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.3.6 (FreeBSD)
Comment: What is this gibberish?
-----END PGP SIGNATURE-----
More information about the Gnupg-users