WeDPR t_out_of_n OT 协议 ,算法实现见:https://github.com/WeBankBlockchain/WeDPR-Lab-Crypto/tree/main/crypto/oblivious_transfer/base_ot
messageList = [{id _0,message_0}, {id_1,message_1}, {id_2, message_2} , {id_3, message_3} ]
其中id_i 为对应message_i 的标识,id_i 公开
生成随机数 a , b
计算 c = a * b
计算 point_x = a * G1
point_y = b * G1
假设receiver 想要获取消息message_1和message_3,设idList =[id_1, id_3 ], 计算如下
}
point_z_list =[point_z_i]
最后得到 ReceiverSecret= { b } , ReceiverCommitment = {point_x ,point_y ,point_z_list}
并将ReceiverCommitment 发送给sender
选择随机数r,s
计算key_basepoint_j = s * point_x + r * G1
计算finger_j = hah(message_j)
}
}
最后将key_basepoint_List 和 encrypted_message_list和finger_list 发送给receiver
key_basepoint_List = [key_basepoint_j ]
encrypted_message_list=[encrypted_message_i_j ] //列表长度 i*j
finger_list = [finger_j ]
}
}