internal void checkProofs() { var nc = retrieveTotalCandidates(); var pk = retrieveKey(); var djn = new DJN.DJN(nc); var vids = retrieveVoteIDs(); int count = 0; foreach (var vid in vids) { var vote = retrieveProofs(vid); var ok = false; if (vote.Item2.Item1.Length > 0) { ok = djn.checkProof(vote.Item1, vote.Item2, pk); if (ok) count++; setVoteValidity(vid, ok); } log("Vote with id:" + vid + (ok ? " is valid!" : " is invalid!")); } log("Num of valid votes = "+count); }