public IActionResult GetECDSA() { var model = new IntegrityModel(); model.PrivateKeyBase64 = ECKey.GenerateKeyIntPrivateKey(); model.PublicKeyBase64 = ECKey.GetPublicKeyFromPrivateKeyEx(Base64Decode(model.PrivateKeyBase64)); var messageBase64 = Base64Encode(GetUniqueKey(32)); var privateKey = BigInteger.Parse(Base64Decode(model.PrivateKeyBase64)); var signature = ECKey.GenerateECDSASignature(messageBase64, privateKey.ToString()); model.Verified = ECKey.ValidECDSASignature(signature, messageBase64, model.PublicKeyBase64).ToString(); return(View("GetECDSA", model)); }