private void CreateValidator() { var checkCrypto = false; var i = 0; while (!checkCrypto) { Validator = new Validator(CryptographyProvider); Validator.CreateKeys(); var validatorKey = Validator.PublicKey.GetChangeableCopy(); var elector = new Elector(CryptographyProvider, validatorKey); elector.CreateNewKeys(); var blindedSigned = elector.CreateBlindedSignedMessage(0); var blinded = elector.CreateBlindedMessage(0); checkCrypto = CryptographyProvider.VerifyData(elector.PublicSignKey.GetChangeableCopy(), blinded, blindedSigned); i++; } }
public void InitializeElector(Dictionary <string, object> validatorKey) { var checkCrypto = false; var i = 0; while (!checkCrypto) { Elector = new Elector(CryptographyProvider, validatorKey); Elector.CreateNewKeys(); var blindedSigned = Elector.CreateBlindedSignedMessage(0); var blinded = Elector.CreateBlindedMessage(0); checkCrypto = CryptographyProvider.VerifyData(Elector.PublicSignKey.GetCopy(), blinded, blindedSigned); i++; } LogIn(); Debug.Log("Elector created"); }