|
Most modern operating systems spend a considerable amount of time
doing buffer-to-buffer data transfer. This is costly
since memory access is a bottleneck on systems with fast
processors. In addition, some applications and data files are often
kept encrypted on a disk and must be decrypted on-the-fly before they
can run or be processed. We take these facts into account and attempt
to encrypt streams of data as they are being copied.
In this project we try to understand the issues that must
be considered when implementing stream ciphers on superscalar
processors with deep pipelines. One of the goals is to find ways to exploit
the instruction level parallelism and to use all available bus and memory
bandwidth to achieve the highest possible rate of encryption with copying.
The initial experiments demonstrate that blocks of data can be copied with
encryption for virtually the same cost as copying alone. We have achieved
these results by paying very careful attention to the scheduling of
instructions and memory references, loop unrolling, and careful
hand-optimization of the inner loop of both copy and copy-plus-encrypt
operations.
In other words, memory copy with encryption can be made virtually as efficient
as a traditional memory copy.
|