public static void generateSecretKey(IBB84Protocol protocol, int size)
        {
            int retry = 10;
            int counter;
            for (counter = 0; counter < retry; counter++)
            {
                try
                {
                    protocol.Process(size);
                    break;
                }
                catch (BB84ProtocolException)
                {}
            }

            if (counter >= retry)
            { throw new BB84ProtocolException(); }
        }
        public static void generateSecretKey(IBB84Protocol protocol, int size)
        {
            int retry = 10;
            int counter;
            for (counter = 0; counter < retry; counter++)
            {
                try
                {
                    protocol.Process(size);
                    break;
                }
                catch (BB84ProtocolKeyPartialComparisonException)
                {}
                catch (BB84ProtocolKeySizeException)
                {};
            }

            if (counter >= retry)
            { throw new BB84ProtocolAutomatedGenerationException();}
        }