lowatt / lowatt-enedis

A command-line tool and Python library to access enedis SGE SOAP web-services
GNU General Public License v3.0
17 stars 13 forks source link

Decrypting files received on SFTP server #57

Closed brgodefroy closed 4 months ago

brgodefroy commented 4 months ago

We are receiving JSON and zip files from Enedis on our SFTP server (after calling the "cmdHistoFine" endpoint, for load curve data on the C5 segment). However, we are encountering issues with accessing and decompressing these files.

It appears that the files might be encrypted using AES, but we have not received any decryption key from Enedis.

If anyone has successfully accessed these files, could you please share your approach? Any tips or insights would be greatly appreciated.

Thank you for any assistance you can provide!

philpep commented 4 months ago

Hi, you should indeed ask Enedis (open a ticket in "spice") for OpenSSL key and iv, respectively called "fichier clé" and "fichier mot de passe".

Then you can use lowatt-enedis decrypt --key XXX --iv XXX -o output.zip input.zip to decrypt files (it can also be done via python API or using a openssl command documented here : https://github.com/lowatt/lowatt-enedis/blob/main/lowatt_enedis/decrypt.py#L9 )

brgodefroy commented 4 months ago

Thanks a lot!!