I'm developing a sensor network. I'd like to encrypt all data without using external libraries. As bearssl is already integrated. Do you know any tutorial or example code to do (ChaCha20, for instance) encryption using bearssl?
I do not need all the SSL and certificates related stuff. What I need to do is:
- Negotiate a shared key using ECDH
- Create an encryption context
- Add Key and IV
- Feed data to encrypt
- Delete context