Ejemplo n.º 1
0
 public Attack(RSA_PKCS RSA, PublicKey publicKey, PrivateKey privateKey)
 {
     this.RSA   = RSA;
     PublicKey  = publicKey;
     PrivateKey = privateKey;
     B          = BigInteger.Pow(2, 8 * (int.Parse(publicKey.getK().ToString()) - 2));
     Intervals  = new List <Interval>();
 }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            PublicKey  publicKey  = new PublicKey();
            PrivateKey privateKey = new PrivateKey();
            RSA_PKCS   rsa        = new RSA_PKCS(privateKey);
            string     message    = "hello, Egor";
            string     cipherText = rsa.Encode(publicKey, message);

            Attack attack = new Attack(rsa, publicKey, privateKey);

            attack.Start(cipherText);
        }