RSA Security 5.2.2 Projection Television User Manual


 
Cryptography Overview
76 RSA BSAFE Crypto-C Developers Guide
Encrypting a Message Using the Public Key
Anyone who wishes to send Bob an encrypted message can do so using the elliptic
curve parameters and Q. To encrypt a message M, where the length (in bytes) of the
message is f, another party follows these steps:
1. Compute a random value, k
1
, between 1 and n 1.
2. Compute the elliptic curve point Q
1
= k
1
P. This will be transmitted along with the
encrypted message.
3. Compute the elliptic curve point S
1
= k
1
Q. S
1
is a pair (x
1
,y
1
). This is the secret
information the sender uses to encode the message.
4. Compute a one time pad, otp, of length f, from x
1
using a key derivation function
(KDF). otp is a concatenation of a series of hashes; it is constructed using f, x
1
, and
SHA1. otp is described below. The description uses the following notation: (1)
||
denotes the concatenation of two numbers, (2) for a number a, [a] denotes the
integer part of a. In particular, [f/160] denotes the integer part of f/160.
a. Initiate a 32-bit, big-endian bit string counter. In hex, counter is initialized to
00000001
16
.
b. For i = 1 to [f/160], create a series of hashes, as follows:
Compute Hash
i
= SHA1(x
1
|| counter), that is, the SHA1 hash of the
concatenation of x
1
and counter.
Increment counter.
Increment i.
c. We want the length of the pad to be exactly the same as the length, f, of the
message M. If f/160 is not an integer, we need to truncate the last hash to
make the lengths equal. Therefore, we define Hash
[f/160]
as follows:
d. Set otp to be the concatenation of the series of hashes:
otp = Hash
1
|| Hash
2
|||| Hash
[f/160]-1
|| Hash
[f/160]
5. Compute M= otp XOR M.
Hash
[f/160]
=
{
Hash
[f/160]
if f/160 is an integer
the [f/160] (160 × [f/160])
leftmost bits of Hash
[f/160]
if f/160 is not an integer