## With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

No credit card required

## 12.3 THE RSA ENCIPHERMENT AND DECIPHERMENT OF ASCII-PLAINTEXT

RSA enciphers and deciphers integers in . To encipher data, RSA needs to be extended to encipher n-grams of ASCII characters x = (x(0), x(1), …, x(n−1)). An Internet standard is described in [Linn, 1989]; I describe a slightly modified version, using 7 bits for each ASCII character rather than 8 bits.

The extension replaces ASCII text by a binary sequence, which is segmented into bit-vectors of length N2 − 1 where 2N2 − 1 − 1 ≤ N < 2N2. Each such bit-vector corresponds to an integer k in to which RSA-exponentiation Ee can be applied. The resulting integer j = Ee(k) in general requires N2 bits in its base-2 representation so that there is an expansion under RSA encipherment.

### 12.3.1 RSA Encipherment of ASCII Plaintext

E1. Replace each character x(i) of ASCII plaintext x = (x(0), x(1), …, x(n−1)) by the 7-bit binary encoding of its ordinal value in the ASCII character code (Table 12.1).

E2. Concatenate to form the (0,1)-plaintext z (x(0), x(1), …, x(n−1)) → z = (z0, z1, …, z7n−1).

E3. Assume integers in require N2 bits in their ...

## With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

No credit card required