Example #1
0
        public RSA(int keySize)
        {
            _keySize = keySize;
            var smallPrimeNum      = new SmallPrimeNum();
            var _smallPrimeNumList = smallPrimeNum.SmallPrimeNumbers();

            smallPrimeNumList = _smallPrimeNumList;
            var keys = GenerateKeys(_keySize);

            eValue = keys[0];
            dValue = keys[1];
            nValue = keys[2];
        }
Example #2
0
        public ElGamalAlgorithm(int keySize)
        {
            _keySize = keySize;
            var smallPrimeNum      = new SmallPrimeNum();
            var _smallPrimeNumList = smallPrimeNum.SmallPrimeNumbers();

            smallPrimeNumList = _smallPrimeNumList;
            var keysArr = GenerateKeys();

            pValue = keysArr[0];
            kValue = keysArr[1];
            gValue = keysArr[2];
            xValue = keysArr[3];
            yValue = keysArr[4];
        }