background image
Tech Note #35: How Encryption and Digital Signatures Work
1999 Bionic Buffalo Corporation; All Rights Reserved.
                  19 May 1999
10 of 10
Conduct the session using messages symmetrically encrypted with the session key.
If necessary, exchange digitally-signed certificates to establish each other’s identity.
The certificates are exchanged after the encrypted session is established. Otherwise, an attacker
might “sneak in” between the certificate exchange in the beginning of the encrypted session.
The attacker could intercept the traffic, and then pretend to be one or both of the parties. (This
is called a “man in the middle” attack.)
Session keys, and the above scenario, are used not only for on-line communication, but also for
e-mail. For example, PGP encrypts each e-mail message using a pseudo-random session key
and symmetric cryptography. Each mail message is sent along with its symmetric key, but the
symmetric key is encrypted using public-key cryptography. If a message is to be read by more
than one recipient, then multiple copies of the symmetric session key are included, each
encrypted with the public key of one of the intended recipients.
Sometimes, a session may not need to be private (encrypted), but it must be secure against lost
or inserted messages. An attacker may desire to insert or delete messages, modifying the
message sequence numbers to fool the recipients.
A defense against message insertion or deletion can be done without encryption, using the hash
functions described in the above section describing digital signatures. To use this defense, the
parties must share a secret value, which can be exchanged beforehand or which can be
exchanged at the time of the session using public key cryptography. Along with the message
sequence number, each message contains a hash of the message, the sequence number and the
secret value together. Even if an attacker is able to modify the sequence numbers or the message
itself, he cannot correctly modify the hash values without knowing the shared, secret value.
(Digital signatures can be used to achieve this same purpose, but the computational effort would
be much greater.)
This Tech Note may be reproduced and distributed without payment of fees or without
notification to Bionic Buffalo, as long as it is not changed, altered, or edited in any way. Any
distribution or copy must include the entire Tech Note, with the original title, copyright notice,
and this paragraph. For available Tech Notes, please see the Bionic Buffalo web site, at, or email