Mailing List Archive

Improved verification of messages
I'm currently planning to set up a web shop where
customers will be able to enter their credit card and
other details via SSL, and at the server the details
will be encrypted using GnuPG and a public key.

This public key will only be used for orders, so it
will not be distributed to anyone - in fact it will
have 500 permissions on the server so that no-one
except my user-id and root ought to be able to read
the key. The corresponding private key will NOT be
stored on the server.

The encrypted details will then be emailed to me and I
will use the private key on my local PC to decrypt the
details.

This is about as secure as I can envisage, but if
someone does happen to get a copy of the public key
from the server, then they *may* be able to forge an
encrypted order (with perhaps lower prices for some of
the articles).

So, I need an added level of security so that I can be
sure that an order email REALLY came from the shopping
cart script and not from someone who managed to get a
copy of the public key.

Is it possible to get this added level of security?

Thanks

Colin


__________________________________________________
Do You Yahoo!?
Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/

--
Archive is at http://lists.gnupg.org - Unsubscribe by sending mail
with a subject of "unsubscribe" to gnupg-users-request@gnupg.org
Re: Improved verification of messages [ In reply to ]
On Wed, 13 Sep 2000, - wrote:

> someone does happen to get a copy of the public key
> from the server, then they *may* be able to forge an
> encrypted order (with perhaps lower prices for some of
> the articles).

So you need to sign the mail using a secret key oin the server.
Another way would be to just put some secret string into the
encrypted mail or recheck each receiver mail with a log kept on the
server.

Anyway, an attacker who gets access to the webserver will be able to
do whatever he wants.

Werner


--
Werner Koch GnuPG key: 621CC013
OpenIT GmbH http://www.OpenIT.de

--
Archive is at http://lists.gnupg.org - Unsubscribe by sending mail
with a subject of "unsubscribe" to gnupg-users-request@gnupg.org
Re: Improved verification of messages [ In reply to ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

- -, at 01:06 -0700 on Wed, 13 Sep 2000, wrote:

> This public key will only be used for orders, so it
> will not be distributed to anyone - in fact it will
> have 500 permissions on the server so that no-one
> except my user-id and root ought to be able to read
> the key. The corresponding private key will NOT be
> stored on the server.

This is a bad approach, does not provide you with any real security, and
makes you semi-believe you've got some sort of authentication by having
orders encrypted with a specific public-key. Your security needs to come
from authenticating that orders come from your webserver to your
processing forms correctly, and from your processing forms to you
correctly. Or, why not just accept any form as being valid? Use the
payment options as authentication.

- --
Frank Tobin http://www.uiuc.edu/~ftobin/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.2 (FreeBSD)
Comment: pgpenvelope 2.9.0 - http://pgpenvelope.sourceforge.net/

iEYEARECAAYFAjm/UFIACgkQVv/RCiYMT6P19QCfXWstV7+bBuvh5mEkgp9Of4bM
2OYAnik6wepiPapP+JvcnBkCXG4Ufol5
=UZt/
-----END PGP SIGNATURE-----

--
Archive is at http://lists.gnupg.org - Unsubscribe by sending mail
with a subject of "unsubscribe" to gnupg-users-request@gnupg.org
Re: Improved verification of messages [ In reply to ]
----- Forwarded message from - <cbyh@yahoo.com> -----

Subject: Re: Improved verification of messages
To: Werner Koch <wk@gnupg.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii

Thanks for the feedback everyone. A bit of extra
background info - the shopping cart script would be
running with the SUID bit set, and would therefore be
running under my user ID. Also all of my files on the
server would have NO permissions for group and world,
so no other user (apart from root) should be able to
read the cart script, the keyring files nor any other
files in my area of the server.

Yes, if a hacker got access to the server AND got to
run as root or as MY user id, then they would be able
to read the shopping cart script AND would be able to
copy the keyring files.

This would mean that they would also have access to
the private key which a couple of you suggested the
cart should use to sign the order. In that case I
don't think that adding the extra secret key and
signing procedure to the server would help that much,
apart from introducing a small increase in complexity
- but anyone studying the script would see the command
that signed and encrypted the order message.

As I see it, the most important thing is that if
someone submits a 'proper' order via the shopping cart
(and SSL), then their credit card details will be
immediately encrypted, will NOT be stored on the
server and can ONLY be decrypted locally by me. Even
if a hacker got to view the cart script and the
keyring files they would still not be able to decrypt
any of the REAL order emails (assuming they were able
to intercept them) because they don't have my private
key - is this correct?

But by studying the cart script and the keyring files
they WOULD be able to assemble a fake signed and
encrypted order email. But this wouldn't help them
much because if they were using say a stolen credit
card number, they could just as easily have submitted
this via the 'proper' cart order form on the web site
instead. We can still perform a series of manual
checks to the details when we receive the order email
to reduce the possibility of credit card fraud - we
would be doing this anyway for a telephone or faxed
order.

I was just looking for an additional safety check
which would give us better trust that the email really
HAD come from the cart script. From your replies I see
that I can get the script to additionally sign the
encrypted order, but if someone gets to read the
keyring files on the server they will be able to fake
the signing too, so it doesn't seem to help that much.

That's how I see it, but I am not an expert in
security or GnuPG, so if you see any problems with
this or have any suggestions as to how I can improve
security, please do let me know!

> Use the payment options as authentication.

Do you mean the payment gateways such as NetBanx? If
so, then this won't really work for us. We sell a lot
of unique and one-off items and we need to be sure
that two people have not ordered the same thing at the
same time, or that someone in our *real* shop bought
an item before we next checked our email. We can't
allow a credit card to get immediately debited the
moment an online order is placed.

Thanks

Colin


__________________________________________________
Do You Yahoo!?
Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/


----- End forwarded message -----

--
Werner Koch GnuPG key: 621CC013
OpenIT GmbH http://www.OpenIT.de

--
Archive is at http://lists.gnupg.org - Unsubscribe by sending mail
with a subject of "unsubscribe" to gnupg-users-request@gnupg.org