-
Notifications
You must be signed in to change notification settings - Fork 171
Description
Firstly, I would like to thank you for your excellent work on the Charm-Crypto library, which has been fundamental for academic research like mine.
I am currently implementing a proof of concept using the CPabe_BSW07 scheme as part of my master's research. Initially, I attempted to encrypt real IoT sensor data directly using ABE. The process involved encrypting the sensor data, serializing the ciphertext with abe.serialize(), transmitting it (via MQTT and local testing), and then deserializing it on the consumer side to perform decryption. However, I encountered a conceptual limitation during this approach. Since ABE schemes like CPabe_BSW07 operate over elements of bilinear groups (e.g., G1, G2, GT), when encrypting arbitrary data (such as raw sensor values), the data is first mapped into a group element. As a result:
- Upon decryption, instead of retrieving the original sensor value, I would obtain a group element representation (an abstract numerical value within GT), which does not correspond to the original plaintext.
Furthermore, this behavior made it impractical to measure realistic encryption and decryption times for varying data sizes, since what is actually being encrypted is a fixed-size mathematical object inherent to the group structure, regardless of the original data size.Rerecognizing this, I shifted to a more suitable approach by encrypting a symmetric AES key with ABE and using that key to encrypt the actual sensor data (hybrid encryption). However, even with this adjustment, I still faced challenges related to serialization and deserialization of the ABE ciphertexts, leading to decryption failures after transmission.
I would greatly appreciate any guidance regarding:
-
Best practices for handling arbitrary data encryption using Charm-Crypto's ABE schemes.
-
Recommendations on managing serialization/deserialization across different processes.
-
Whether the behavior I observed is expected when attempting to encrypt raw data directly with ABE.
Tks for your time and support.
Best regards,
Wesley Fioreze