Is Patent us5930362 weak because it has only 2 independent claims that specifically reference DH. Could this patent be circumvented by computing something that is not specifically DH but could be transformed into DH in the consumer node - for example, flip every 3rd bit; or split it into two parts. This patent is a demonstration of the sort of general operations that are taught in undergraduate computer science classes. When a general operation is specifically applied to a particular technology field, does it qualify for a patent?
I would agree that taking the plain meaning of the claim wording, it is DH specific. If calculating DH with a bit somewhere flipped requires first: a) calculate DH, then b) flip a bit, then I would say you have calculated DH in the process and fulfilled that claim requirement. For the storing step, I imagine most people would think storing a value X as the compliment of X and upon retreival restoring it to X is equal to storing X. If your application does not require DH for interoperability you could use something else. Or just do not precompute a chunk of them.
Regarding the second part of the question, there are many people who would not see applying a known technique to a new application as patentable and many that would. There is no bright line and like many things in patenting, it depends. It is case by case, examiner by examiner and judge by judge.
I think here the doctrine of equivalents needs to be kept in mind. Under the doctrine of equivalents, a patent claim can be read to cover not only what is literally specified in the claim proper, but also "reasonable equivalents thereof".
With that in mind, let's consider your proposed workarounds. First, changing the bit pattern in some predictable fashion so the stored bit pattern differs from what was computed, but the computed pattern can later be restored.
In my opinion, this should be considered equivalent. Just for example, most disk drives use some sort of RLL encoding, in which N bits of input actually expand to M bits stored on disk (M>N) with some specified limitations on the bit patterns (basically that you have bit transitions at some minimum interval). As such, the simple process of (for example) storing and retrieving the value
0 on a disk drive involves changing the original bit pattern to some other bit pattern, in which the pattern stored on disk will have at least some bits set. As such, flipping some bits is not substantially different from what we expect to happen in even the most straightforward implementation of the patent precisely as written.
The same basic idea applies to splitting the data up and later combining it. The patent specifies storage in a database. In October 1996 (priority date of the patent) a person of ordinary skill in the art would have understood that storing data in a database could include using such technologies as disk striping or other forms of RAID that split the data up, store pieces on separate disks, and later combine those pieces back into a single stream.
For that matter, using RAID 5, you'd get both effects at once -- given N disks in RAID 5, the original data is split between N-1 disks, and the Nth disk stores the XOR of the other disks. If any one disk fails, the original data can be retrieved from the remaining N-1 disks. Even without a failure, the data would be split up and then put back together during retrieval, and if one of the other disks had failed, the last part of the data is created by XORing the available data together, so the bits produced as output are not (necessarily) the same as what is stored on any disk.
Bottom line: a person of ordinary skill in the art at the time of the invention would have recognized both of your proposed workarounds as falling within the scope of the claims. In fact, after rereading what I've written, I'm half-tempted to do some editing to remove reference to the doctrine of equivalents -- the more I think about it, the more I'm convinced that both your proposed workarounds would probably qualify as literal infringement. There's probably no need to involve the doctrine of equivalents at all.