Port hd_keys to the new ec_keys
Switch key_formats to the new ec_keys system
Use to_data_chunk in key_formats