Research Article

A Privacy-Preserving Attribute-Based Encryption System for Data Sharing in Smart Cities

Algorithm 1

0- and 1-encoding generation.
Input: attribute set with name and value
Output: encoding set for each unequal attributes or
1: for any attribute do
2:  Divide attribute into attribute name and attribute value ;
3:  if attribute is an unequal attribute then
4:   Transfer into binary string
5:   if the access policy needs or for attribute then
6:    for any digit in do
7:     ifthen
8:      Set the first digits as a substring of
9:      Add into
10:     end if
11:    end for
12:   end if
13:   if the access policy needs or for attribute then
14:    for any digit in do
15:     ifthen
16:      Set the first digits as a substring of
17:      Add at the end of the substring
18:      Add into
19:     end if
20:    end for
21:   end if
22:   Combine the attribute name with or for unequal attributes
23:  end if
24: end for