예제 #1
0
        public void enrollment(String pass)
        {
            BigInteger e, d, n;
            genRSAKeys(out e, out d, out n);

            BigInteger gp = gengp(pass);

            int cnt = slist.Length;
            BigInteger[] yrand = genyi(cnt, gp);
            BigInteger[] shares = genshares(gp, yrand);
            BigInteger Km = genmaster(shares);

            BigInteger proofPKm = genproof(gp, Km);
            byte[] Uk = cryptU(d, Km);

            for (int i = 0; i < cnt; i++)
            {
                messC1 m = new messC1(name, yrand[i], e, Uk, proofPKm);
                sendenroll(slist[i], m);
            }
            enrolled = true;
            Console.WriteLine("\n{0}: Enrollemnt Succesful !", name);
        }
예제 #2
0
 private void sendenroll(cserver cs, messC1 m)
 {
     cs.enroll(m);
 }
예제 #3
0
 public void enroll(messC1 m)
 {
     clist.Add(m.getA(), m);
     balist.Add(m.getA(),0);
 }