From: ccdanny@uqvax.cc.uq.oz.au (Danny Smith, The Prentice Centre, Univ. of Qld.)
Newsgroups: aus.general,aus.aarnet
Subject: Re: EFTPOS
Date: 9 Oct 92 12:56:38 AEST
Distribution: aus
Organization: University Of Queensland

Let's kill this topic once and for all.

In article <MALCOLM.92Oct9111929@nutmeg.cs.ntu.edu.au>, malcolm@nutmeg.cs.ntu.edu.au (Malcolm Caldwell) writes:
> In-reply-to: ggr@koonda.acci.com.au's message of Thu, 8 Oct 1992 07:59:05 GMT
> Subject: Re: EFTPOS
>    The PIN is not stored directly on the card. Instead it is generated
>    from other information on the card (like your account number and name)
>    using a keyed hashing technique, and the key for this is kept VERY
>    secret (although it is inside all those little boxes...). If you have

true

>    the capability to change the PIN, this is actually done by recording an
>    "offset" on the card. This offset is added (modulo 10000 for 4-digit
>    PINs) to what you typed in, then compared against the PIN as calculated
>    by the keyed hash. In other words, there is enough information on the

true

> I know that the key to decrypt pin form your account number (+ other info) is
> kept in every ATM.  This must mean that Commonwealth + Westpack ATMs have two
> bank keys stored in every machine.  The papers I have read tell how important
> it is for the bank to keep the keys secure.
> 
> All this I understand.  But I do not think that EFTPOS machines keep all the
> keys for all the banks/Building Societies etc.  Besides the number of keys
> that would have to be stored/installed, EFTPOS machines are not in a secure
> environments.  It would be very easy to set up a small business and get a
> EFTPOS machine. (And since there is money in it someone would try!)
> 
> I think that the PIN is transmitted from the EFTPOS to a bank's computer.
> There the PIN is checked against the correct one derived from account number
> and key.  This banks computer is not necessarily on line to all the other
> banks but it can decode the pin.

Basically true.  The transmission should be encrypted on the network for
security and to prevent replay attacks.

The keys that are mentioned are used to generate the PIN from the account
number, plus other information.  I'll list the pieces of information as:
1.  Account Number
2.  Card Number
3.  PIN
4.  Bank's Key
5.  PIN offset

You need (2) and (4) to generate a valid (3).  (4) is kept *very* secret.

The ATM employs a publically known algorithm (which is a one-way function)
using (2) and (4) as input.  Then it adds (5) (modulo) and
takes the last 4 digits of the result.  This should be equal to (3).

This can all be done offline, without the help of the bank's computer if the
keys are stored locally.

This is the *old* system!  Newer systems now use:

DES encrypt( (3), (1), (2)) with PVK (PIN verification Key) to give PVV (PIN
Verification Value).  PVK is a 56 bit DES key.   PVV is written on the card. 
You can only determine the PVK if you can break a 56 bit DES message and you
know (!), (2), and (3).  You need PVK and PVV to get the PIN information, and
since PVK is only known to the bank (kept *very* secret), you will need to
break DES.

Hope this clears up some popular misconceptions.


cheers, dfs...

==========================================================================
 Danny Smith                    |  Phone:  +61 7 365 4105
 The Prentice Centre            |  Fax:    +61 7 365 4477
 The University of Queensland   |
 Qld.  4072.  Australia         |  Internet:  ccdanny@uqvax.cc.uq.edu.au
From: Greg.Kerr@p2.f547.n635.z3.fidonet.org (Greg Kerr)
Sender: acsnet@csource.oz.au