Research Article

A Lightweight Attribute-Based Security Scheme for Fog-Enabled Cyber Physical Systems

Algorithm 7

Encryption.
1: Input:, , and .
2: Output:.
3: Create a random number and compute
            
where is a key derivation function which takes the new elliptic curve point and generates a secret key .
4: Let be the access policy string. Compute the corresponding degree at most polynomial function in as
      
Let denote the coefficient of in the polynomial .
5: Choose two one-way collision resistance hash functions, and , defined as:
            
where is the length of a random string, is the length of message , is a binary string of arbitrary length, and is a binary string of length . The length of the hash value is the same as the length of a random string , and similarly, the hash value will be the same size as the message .
6: Next, the which consists of three components , , and is computed. is a point on the elliptic curve which is computed from the polynomial and components in corresponding to attributes in . is computed as follows:
     
     
Next, is computed by a XOR operation on and computed in Step 3.
            
Lastly, is computed by a XOR operation on and message .