Most patented ``inventions'' are obvious from the prior art. This patent was a rare exception. The Diffie-Hellman system revolutionized cryptography.
Does this mean it was a beneficial patent? No! Diffie and Hellman would have published their system anyway. The patent was an afterthought.
Diffie disclosed the idea of public-key cryptography at a conference in June 1976. Diffie and Hellman also distributed preprints of their ``New Directions in Cryptography'' paper, which disclosed the Diffie-Hellman system, at that conference and by mail. For example, Mike Matyas received a copy in August 1976. The patent was filed in September 1977.
Under United States case law, a document has been published if it ``has been disseminated or otherwise made available to the extent that persons interested and ordinarily skilled in the subject matter or art, exercising reasonable diligence, can locate it.'' A patent is automatically invalid if the patented invention was published more than a year before the patent's filing date.
It appears, therefore, that the Diffie-Hellman-Merkle patent was invalid. In the subsequent court case MIT v. Fortia, another patent was invalidated for the same reason: the inventor handed out six copies of a preprint at a conference fourteen months before applying for the patent.