Random number generation method and system based on homomorphic encryption and smart contract, and medium

The invention provides a random number generation method and system based on homomorphic encryption and a smart contract, and a medium. The method comprises the steps that S1, an active party generates a public key and a private key of homomorphic encryption; s2, the activity party generates a rando...

Ausführliche Beschreibung

Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: SUN ZONGCHEN, DU CHAO, DU MANXIANG
Format: Patent
Sprache:chi ; eng
Schlagworte:
Online-Zugang:Volltext bestellen
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
Beschreibung
Zusammenfassung:The invention provides a random number generation method and system based on homomorphic encryption and a smart contract, and a medium. The method comprises the steps that S1, an active party generates a public key and a private key of homomorphic encryption; s2, the activity party generates a random number and encrypts the random number, and submits the public key and the ciphertext to the smart contract; s3, the participants generate respective random numbers, encrypt the random numbers and upload ciphertexts to the smart contract; s4, adding all ciphertexts of the active party and the participating party; s5, executing a new ciphertext obtained by adding the ciphertexts; and S6, after the appointed time is up, uploading the private key and decrypting the new ciphertext, and publishing the private key and the final random number by the active party. According to the method, all ciphertext correlation calculations can be completed on a chain, and the credibility of random numbers is improved. 本发明提供了一种基于同态加密和