Research Article

Privacy Protection of Social Networks Based on Classified Attribute Encryption

Algorithm 4

Encryption algorithm (En).
Input: BLori
Output: BLen
(1)for (i = 1; n; i++)
(2) map[i] = random (1, n)//Return an integer type random number between 0 and 1;
(3) end for (i = i; n; i++)
(4)for (i = i; n; i++)
(5) RegStat[0] = (rand() << 17) | (rand() << 3) | (rand()); //Generate random number store in the register;
(6) RegStat[0]take as seed, and generate pseudorandom number sequence PRS = (p1, p2, …, pn);
(7) for (j = 1; n; j++)
(8)  RegStat[j] = bjipj;
(9)  RegStat[map[t]] = RegSta[i]; //Rearrangement of registers by mapping table
(10) end for
(11) for (k = 1; n; k++)
(12)  add RegStat[k] to the K record of BLen.
(13) end for
(14)end for