A user attribute matching method and terminal. The method includes the first terminal using the ElGamal algorithm to generate a key (S101); the first terminal uses the public key to encrypt the first user attribute value vector of the first terminal to form a first cipher (S102); the first terminal sends the first cipher and the public key to the second terminal to enable the second end to end. At the end, the second user attribute value vector of the second terminal is calculated with the received first ciphertext, and the second ciphertext is obtained, and the module of the second user attribute value vector is encrypted with the public key, and the third ciphertext is obtained, and the second ciphertext and the third ciphertext are sent to the first terminal (S103). The first terminal receives the second ciphertext and the third ciphertext (S104) sent by the second terminal; the first terminal decrypts the received second ciphertext and the third ciphertext according to the private key (S105); the first terminal is based on the decrypted second cipher and the third ciphertext. The matching degree of similarity (S106) to the user attributes of the first terminal and the second terminal. The proposed method does not need to know the plaintext of the user's attribute value, thus the matching result of the user's attribute information is obtained on the premise of protecting the user's privacy by lightweight operation, which improves the matching efficiency and reduces the computing burden of the terminal.
【技术实现步骤摘要】
【国外来华专利技术】PCT国内申请,说明书已公开。
【技术保护点】
PCT国内申请,权利要求书已公开。
【技术特征摘要】
【国外来华专利技术】PCT国内申请,...
还没有人留言评论。发表了对其他浏览者有用的留言会获得科技券。