434
Relations, Functions, and Matrices
somewhere in the computer system, and this information is obviously sensitive.
Anyone with a copy of the password file has open access to the computer and could
even use the ID/password that has the highest level of computer privileges (such as
the system administrator ID/password). Therefore the password file, like the secret messages discussed earlier, must be protected. The operating system will, by
default, store the password file with the highest level of protection so that only a
system administrator account has access. But as an added protection, the file will
be encrypted in some way. A password file might have entries something like this:
user ID
encrypted pW
jgarcia
ax*79%
wbriggs
ee&46#
Unlike secret messages being transmitted, the password file is in constant use.
The operating system must be able to quickly authenticate a given user by checking that the password the user enters matches the password stored for that user
ID. When the user ID jgarcia is entered, one approach would be to find jgarcia
in the password file, decrypt the corresponding encrypted password (ax*79% in
this case) and see if the result matches what the user entered. But this means that,
however fleetingly, a legitimate “clear” password would be stored within the computer for this user ID, and might be captured by someone hacking the system at
that moment, perhaps even someone posing as the jgarcia user and guessing at the
correct password.
A better approach is to apply the encryption key (also stored in the system) to
the password entered and then check the resulting encrypted password against the
table entry of ax*79%. A match occurs only if the correct password was entered. If
a hacker’s attempt fails, he or she does gain the knowledge that what they entered
is not the jgarcia password, but that is of no help in finding the correct password.
Better still is to use a form of encryption that does not require storing an
encryption key. A hash function is often used to encrypt passwords. The ideal
cryptographic hash function h has two characteristics:
1. Given x, it is easy to compute the hashed value h(x).
2. Given a hashed value z, it is difficult to find a value x for which h(x) = z.
Because of these characteristics, a hash function is also called a one-way
encryption. The password file would now have entries such as
user ID
hashed pW
jgarcia
h(password 1)
wbriggs
h(password 2)
Property (2) means that if the password file falls into the wrong hands, it is of
little use in trying to break into the system, even if the hash algorithm being used
is known. Hence securing the password file is no longer a concern. Property (2)
also means that a cryptographic hash function is likely to be more complex than a
hash function used to build a hash table for searching, as discussed earlier. There
are many well-known encryption/hashing functions, most of which involve use of
the modulo n function where n is some power of 2.
Précédent

- 451/986

Suivant