The Perl 5 module Crypt::DH implements the Diffie-Hellman key exchange system.