示例#1
0
        static void Main(string[] args)
        {
            // estimating costs

            bool free_swaps = true;

            Console.Write("operation, CNOT count, 1-qubit Clifford count, T count, R count, M count, T depth, initial width, extra width, comment, full depth");


            // GIFT-64
            Estimates.GiftSBox <QGIFT.InPlace.GiftSbox>("tower_field = false", free_swaps);
            Estimates.SubCells <QGIFT.InPlace.SubCells>("state size is the same for all", free_swaps);
            Estimates.PermBits <QGIFT.InPlace.PermBits>("in_place = true - state size is the same for all", free_swaps);
            Estimates.AddRoundKey <QGIFT.InPlace.AddRoundKey>("widest = true - state size is the same for all", free_swaps);
            Estimates.KeySchedule <QGIFT.InPlace.KeySchedule>("in_place = true - round = 28", 28, free_swaps);
            Estimates.AddConstants <QGIFT.InPlace.AddConstants>("widest = true - state size is the same for all", 28, free_swaps);

            // GIFT-64
            Estimates.Round <QGIFT.Round>("state size is the same for all", 0, free_swaps);
            for (int round = 1; round <= 28; round++)
            {
                Estimates.Round <QGIFT.Round>($"round = {round}", round, free_swaps);
            }

            Estimates.Gift <QGIFT.Gift>("in_place", 28, free_swaps, "_128_in-place");

            Estimates.GroverOracle <QGIFT.GroverOracle>("in_place mixcolumn - r = 1", 1, 28, free_swaps, "_128_in-place-MC_r1");
            Estimates.GroverOracle <QGIFT.GroverOracle>("in_place mixcolumn - r = 2", 2, 28, free_swaps, "_128_in-place-MC_r2");
            Estimates.GroverOracle <QGIFT.GroverOracle>("in_place mixcolumn - r = 3", 3, 28, free_swaps, "_128_in-place-MC_r3");

            Console.WriteLine();
        }
示例#2
0
        static void Main(string[] args)
        {
            // estimating costs

            bool free_swaps = true;

            Console.Write("operation, CNOT count, 1-qubit Clifford count, T count, R count, M count, T depth, initial width, extra width, comment, full depth");


            // SATURNIN
            Estimates.SaturninSboxZero <QSATURNIN.InPlace.SaturninSboxZero>("in_place = true", free_swaps);
            Estimates.SaturninSBoxOne <QSATURNIN.InPlace.SaturninSboxOne>("in_place = true", free_swaps);
            Estimates.SubCells <QSATURNIN.InPlace.SubCells>("in_place = true", free_swaps);
            Estimates.NibblePermutation <QSATURNIN.InPlace.NibblePermutation>("in_place = true", 20, free_swaps);
            Estimates.MixHalfWord <QSATURNIN.InPlace.MixHalfWord>("in_place = true", true, free_swaps);
            Estimates.MixColumns <QSATURNIN.InPlace.MixColumns>("in_place = true", true, free_swaps);
            Estimates.InverseNibblePermutation <QSATURNIN.InPlace.InverseNibblePermutation>("in_place = true", 20, free_swaps);
            Estimates.AddRoundKey <QSATURNIN.InPlace.AddRoundKey>("in_place = true", free_swaps);
            Estimates.AddRoundConstants <QSATURNIN.InPlace.AddRoundConstants>("in_place = true", free_swaps);
            Estimates.RotateKey <QSATURNIN.InPlace.RotateKey>("in_place = true", free_swaps);
            Estimates.SubKeyGeneration <QSATURNIN.InPlace.SubKeyGeneration>("in_place = true, super-round = 10, ", 20, free_swaps);


            // SATURNIN 256
            Estimates.Round <QSATURNIN.Round>("state size is the same for all", 0, free_swaps);
            for (int round = 1; round <= 20; round++)
            {
                Estimates.Round <QSATURNIN.Round>($"round = {round}", round, free_swaps);
            }

            Estimates.SATURNIN <QSATURNIN.SATURNIN>("in_place", 20, free_swaps, "_256_in-place");

            Estimates.GroverOracle <QSATURNIN.GroverOracle>("in_place mixcolumn - r = 1", 1, 20, free_swaps, "_256_in-place-MC_r1");
            Estimates.GroverOracle <QSATURNIN.GroverOracle>("in_place mixcolumn - r = 2", 2, 20, free_swaps, "_256_in-place-MC_r2");
            Estimates.GroverOracle <QSATURNIN.GroverOracle>("in_place mixcolumn - r = 3", 3, 20, free_swaps, "_256_in-place-MC_r3");

            Console.WriteLine();
        }
示例#3
0
        static void Main(string[] args)
        {
            // estimating costs

            bool free_swaps = true;

            Console.Write("operation, CNOT count, 1-qubit Clifford count, T count, R count, M count, T depth, initial width, extra width, comment, full depth");


            // SKINNY-64
            Estimates.SkinnySBox <QSKINNY.InPlace.SkinnySbox>("tower_field = false", free_swaps);
            Estimates.SubCells <QSKINNY.InPlace.SubCells>("state size is the same for all", free_swaps);
            Estimates.AddConstants <QSKINNY.InPlace.AddConstants>("in_place = true - state size is the same for all", 40, free_swaps);
            Estimates.AddRoundTweakey <QSKINNY.InPlace.AddRoundTweakey>("widest = true - state size is the same for all", free_swaps);
            Estimates.AddRoundTweakey_z2 <QSKINNY.InPlace.AddRoundTweakey_z2>("widest = true - state size is the same for all", free_swaps);
            Estimates.AddRoundTweakey_z3 <QSKINNY.InPlace.AddRoundTweakey_z3>("widest = true - state size is the same for all", free_swaps);


            Estimates.TweakeyUpdate <QSKINNY.InPlace.TweakeyUpdate>("in_place = true - round = 32", 32, free_swaps);
            Estimates.TweakeyUpdate_z2 <QSKINNY.InPlace.TweakeyUpdate_2>("in_place = true - round = 36", 36, free_swaps);
            Estimates.TweakeyUpdate_z3 <QSKINNY.InPlace.TweakeyUpdate_3>("in_place = true - round = 40", 40, free_swaps);


            Estimates.ShiftRows <QSKINNY.InPlace.ShiftRows>("widest = true - state size is the same for all", free_swaps);
            Estimates.MixHalfWord <QSKINNY.InPlace.MixHalfWord>("widest = true - state size is the same for all", true, free_swaps);
            Estimates.MixColumns <QSKINNY.InPlace.MixColumns>("widest = true - state size is the same for all", true, free_swaps);


            // SKINNY-64
            Estimates.Round <QSKINNY_64_64.Round>("state size is the same for all", 0, free_swaps);
            for (int round = 1; round <= 32; round++)
            {
                Estimates.Round <QSKINNY_64_64.Round>($"round = {round}", round, free_swaps);
            }

            Estimates.Round <QSKINNY_64_128.Round>("state size is the same for all", 0, free_swaps);
            for (int round = 1; round <= 36; round++)
            {
                Estimates.Round_z2 <QSKINNY_64_128.Round>($"round = {round}", round, free_swaps);
            }

            Estimates.Round <QSKINNY_64_192.Round>("state size is the same for all", 0, free_swaps);
            for (int round = 1; round <= 40; round++)
            {
                Estimates.Round_z3 <QSKINNY_64_192.Round>($"round = {round}", round, free_swaps);
            }

            Estimates.Skinny_64_64 <QSKINNY_64_64.Skinny>("in_place", 32, free_swaps, "_128_in-place");
            Estimates.Skinny_64_128 <QSKINNY_64_128.Skinny>("in_place", 36, free_swaps, "_128_in-place");
            Estimates.Skinny_64_192 <QSKINNY_64_192.Skinny>("in_place", 40, free_swaps, "_128_in-place");

            Estimates.GroverOracle_64_64 <QSKINNY_64_64.GroverOracle>("in_place mixcolumn - r = 1", 1, 32, free_swaps, "_128_in-place-MC_r1");
            Estimates.GroverOracle_64_64 <QSKINNY_64_64.GroverOracle>("in_place mixcolumn - r = 2", 2, 32, free_swaps, "_128_in-place-MC_r2");
            Estimates.GroverOracle_64_64 <QSKINNY_64_64.GroverOracle>("in_place mixcolumn - r = 3", 3, 32, free_swaps, "_128_in-place-MC_r3");

            Estimates.GroverOracle_64_128 <QSKINNY_64_128.GroverOracle>("in_place mixcolumn - r = 1", 1, 36, free_swaps, "_128_in-place-MC_r1");
            Estimates.GroverOracle_64_128 <QSKINNY_64_128.GroverOracle>("in_place mixcolumn - r = 2", 2, 36, free_swaps, "_128_in-place-MC_r2");
            Estimates.GroverOracle_64_128 <QSKINNY_64_128.GroverOracle>("in_place mixcolumn - r = 3", 3, 36, free_swaps, "_128_in-place-MC_r3");

            Estimates.GroverOracle_64_192 <QSKINNY_64_192.GroverOracle>("in_place mixcolumn - r = 1", 1, 40, free_swaps, "_128_in-place-MC_r1");
            Estimates.GroverOracle_64_192 <QSKINNY_64_192.GroverOracle>("in_place mixcolumn - r = 2", 2, 40, free_swaps, "_128_in-place-MC_r2");
            Estimates.GroverOracle_64_192 <QSKINNY_64_192.GroverOracle>("in_place mixcolumn - r = 3", 3, 40, free_swaps, "_128_in-place-MC_r3");


            Console.WriteLine();
        }