Algorithm 1: Smart sensor data integrity and confidentiality algorithms |
Input: SensorData, Key |
Output: CipherData |
Begin |
1. Retrieves the current timestamp timestamp and SN_ID |
2. ProData=SN_ID||SensorData||timestamp; |
3. DataHash=SM3(ProData); |
4. CipherData =SM4(Key,ProData||DataHash); |
5. return CipherData; |
End |