Ignore:
Timestamp:
Sep 23, 2009, 11:15:40 AM (12 years ago)
Author:
Sören Rinne
Message:
  • added setting for number of rounds
Location:
trunk/CrypPlugins/Trivium
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrypPlugins/Trivium/Trivium.cs

    r420 r562  
    509509            // belegung fertig, jetzt takten ohne output
    510510
    511             for (i = 0; i < 1152; i++) // 1152 = 4 * 288
     511            for (i = 0; i < settings.InitRounds; i++) // default 1152 = 4 * 288
    512512            {
    513513                t1 = a[65] ^ (a[90] & a[91]) ^ a[92] ^ b[77];
  • trunk/CrypPlugins/Trivium/TriviumSettings.cs

    r410 r562  
    3535        }
    3636
     37        private int initRounds = 1152;
     38        [TaskPane("Initialization rounds", "How many init rounds should be done? Default is 1152.", null, 1, false, DisplayLevel.Beginner, ControlType.NumericUpDown, ValidationType.RangeInteger, 0, int.MaxValue)]
     39        public int InitRounds
     40        {
     41            get { return this.initRounds; }
     42            set
     43            {
     44                this.initRounds = value;
     45                //OnPropertyChanged("InitRounds");
     46                HasChanges = true;
     47            }
     48        }
     49
    3750        private bool useByteSwapping = false;
    3851        [ContextMenu("Use byte swapping", "With this checkbox enabled, output bytes will be swapped.", 1, DisplayLevel.Experienced, ContextMenuControlType.CheckBox, null, new string[] { "Use byte swapping?" })]
    39         [TaskPane("Use byte swapping", "With this checkbox enabled, output bytes will be swapped.", null, 1, false, DisplayLevel.Beginner, ControlType.CheckBox, "", null)]
     52        [TaskPane("Use byte swapping", "With this checkbox enabled, output bytes will be swapped.", null, 2, false, DisplayLevel.Beginner, ControlType.CheckBox, "", null)]
    4053        public bool UseByteSwapping
    4154        {
     
    5063
    5164        private bool hexOutput = false;
    52         [ContextMenu("Generate Hex output", "With this checkbox enabled, output bytes will be displayed in hex.", 1, DisplayLevel.Experienced, ContextMenuControlType.CheckBox, null, new string[] { "Display as hex?" })]
    53         [TaskPane("Generate Hex output", "With this checkbox enabled, output bytes will be displayed in hex.", null, 1, false, DisplayLevel.Beginner, ControlType.CheckBox, "", null)]
     65        [ContextMenu("Generate Hex output", "With this checkbox enabled, output bytes will be displayed in hex.", 2, DisplayLevel.Experienced, ContextMenuControlType.CheckBox, null, new string[] { "Display as hex?" })]
     66        [TaskPane("Generate Hex output", "With this checkbox enabled, output bytes will be displayed in hex.", null, 3, false, DisplayLevel.Beginner, ControlType.CheckBox, "", null)]
    5467        public bool HexOutput
    5568        {
Note: See TracChangeset for help on using the changeset viewer.