Research Article

Improved Cloud-Assisted Privacy-Preserving Profile-Matching Scheme in Mobile Social Networks

Algorithm 2

Privacy-preserving profile-matching scheme.
Input: Alice’s private vector , and the secret keys of CA and CB.
Output: Alice gets the cosine result .
(1)Alice executes the KeyGen algorithm of the improved HRES algorithm with CA to generate their respective key pairs , and their Diffie–Hellman key . Then, is assigned to the cloud CB.
(2)Alice sends her encrypted profile to CA for querying the proximity with Bob in the social networks.(i)Alice also needs to process her normalized vector with the public number to get the result , and calculates , .(ii)Alice negotiates with CA to run the Diffie–Hellman key exchange protocol to generate a secret random integer .(iii)Alice uploads the encrypted values , , and to CA.
(3)CA generates random integers and works out the following formulas:(i).(ii).
Next, CA computes ; executes the Partial Dec1 algorithm to process and with its secret key ; and then sends the processed results to CB.
(4)CB runs the Evaluation algorithm with its secret key to decrypt and gets where .
(5)CB runs the Partial Dec2 algorithm with its secret key to decrypt and compute . Next, CB sends the encrypted values to CA.
(6)CA computes(i).(ii).(iii).
After that, CA generates a random integer and calculates . Finally, CA runs Partial Dec1 algorithm to decrypt and sends the results to CB.
(7)CB computes the obfuscated proximity result and sends it to CA.(i)CB runs the Partial Dec2 algorithm to decrypt and obtains .(ii)CB processes the value with a pretreatment public integer , computes , and then gets an integer number where .(iii)CB computes with the public key and then sends it to CA.
(8)CA computes the formula , runs the Partial Dec1 algorithm with its secret key to process , and sends the results to Alice.
(9)Alice runs the Partial Dec2 algorithm with her secret key and uses to get which is very close to the matching result .