Hybrid encryption for MQTT payload? i've written a simple code for payload encryption, i'v done it with AES-128 CBC mode ,it works fine ,the senario is very simple : the publisher send a JSON payload format that includes the encryption key , IV (Initialisation Vector) and the encrypted data, the subscriber extract the key and IV then decrypt the data received, but i want to do a sort of hybrid encryption ,to encrypt the key with Asymmetric algorithm, i know the famous RSA, but after reading some articles, RSA is not suitable for constrained ressources devices, have you any idea wich algorithm can i use or somthing else that ensure the key transmission ?
I'm not endorsing your encryption scheme (because frankly it sounds dubious), but libsodium's Public-key authenticated encryption sounds like what you're looking for. It uses Curve25519 internally, which should be less resource-intensive than RSA. There are also bindings for many languages available.