Optimised DKE/DTE code, thanks Daryl Herzmann!