fixed tofu to work with the diffie hellman