Port hd_keys to the new ec_keys