home-assistant / android

:iphone: Home Assistant Companion for Android
https://companion.home-assistant.io/
Apache License 2.0
2.24k stars 626 forks source link

Support encrypted communication with HA #97

Open robbiet480 opened 4 years ago

robbiet480 commented 4 years ago

Just for that extra bit of security, we should implement encrypted communication with HA over the webhook like iOS supports.

robbiet480 commented 4 years ago

Some notes on this:

balloob commented 4 years ago

Do we know the HA version that we talk to ? Seems like something we should know in the app to be able to enable/disable functionality.

robbiet480 commented 4 years ago

@balloob We can get that info from the get_config webhook action.

JBassett commented 4 years ago

Initial work https://github.com/home-assistant/home-assistant-android/tree/feature/webhookEncryption

I am running into issues with HA decrypting my requests... If anyone wants to take a crack at it please do! I have the sodium library pulled and the ability to easily encrypt/decrypt done. But I must be doing something incorrectly...