Ignore:
Timestamp:
May 29, 2009, 2:21:06 PM (13 years ago)
Author:
Sören Rinne
Message:
  • renamed BinaryFunctionParser to BooleanFunctionParser
  • added description for BooleanFunctionParser
Location:
trunk/CrypPlugins/HIGHT
Files:
2 edited

Legend:

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

    r230 r331  
    258258                    StatusChanged((int)HIGHTImage.Encode);
    259259                    GuiLogMessage("Starting encryption [Keysize=128 Bits, Blocksize=64 Bits]", NotificationLevel.Info);
    260                     for (int i = 0; i <= blocks-1; i++)
     260                    for (int i = 0; i <= blocks - 1; i++)
    261261                    {
    262262                        vector[0] = BitConverter.ToUInt32(inputbuffer, (i * 8));
     
    277277                    StatusChanged((int)HIGHTImage.Decode);
    278278                    GuiLogMessage("Starting decryption [Keysize=128 Bits, Blocksize=64 Bits]", NotificationLevel.Info);
    279                     for (int i = 0; i <= blocks-1; i++)
     279                    for (int i = 0; i <= blocks - 1; i++)
    280280                    {
    281281                        vector[0] = BitConverter.ToUInt32(inputbuffer, i * 8);
     
    317317                        GuiLogMessage("Decryption complete! (in: " + inputStream.Length.ToString() + " bytes, out: " + outbytes.ToString() + " bytes)", NotificationLevel.Info);
    318318                    }
    319                     GuiLogMessage("Wrote data to file: " + outputStream.FileName, NotificationLevel.Info);
     319                    GuiLogMessage("Wrote data to file: " + outputStream.FileName, NotificationLevel.Debug);
    320320                    GuiLogMessage("Time used: " + duration.ToString(), NotificationLevel.Debug);
    321321                    outputStream.Close();
     
    348348        }
    349349
    350         uint[] F0 = new uint[256] {
     350        public uint[] F0 = new uint[256] {
    351351                        0, 134, 13, 139, 26, 156, 23, 145, 52, 178, 57, 191, 46, 168, 35, 165,
    352352                        104, 238, 101, 227, 114, 244, 127, 249, 92, 218, 81, 215, 70, 192, 75, 205,
     
    366366                        90, 220, 87, 209, 64, 198, 77, 203, 110, 232, 99, 229, 116, 242, 121, 255};
    367367
    368         uint[] F1 = new uint[256] {
     368        public uint[] F1 = new uint[256] {
    369369                        0, 88, 176, 232, 97, 57, 209, 137, 194, 154, 114, 42, 163, 251, 19, 75,
    370370                        133, 221, 53, 109, 228, 188, 84, 12, 71, 31, 247, 175, 38, 126, 150, 206,
     
    384384                        180, 236, 4, 92, 213, 141, 101, 61, 118, 46, 198, 158, 23, 79, 167, 255};
    385385
    386         uint Delta0 = 0x5a;
     386        public uint Delta0 = 0x5a;
    387387
    388388        private uint LFSR_h(uint state) {
     
    436436        }
    437437
    438         static uint[] Delta = new uint[128];
     438        public static uint[] Delta = new uint[128];
    439439
    440440        private void HIGHT_Enc(uint[] x, ref uint[] y, uint[] mk, uint[] sk) {
     
    553553            uint[] key_temp = new uint[16];
    554554
     555            //MK = Plain = SK = Cipher = temp = Plain_tmp = Cipher_tmp = key_temp = null;
     556
    555557            // convert key into 8 bit values
    556558            key_temp = key;
     
    712714        public void Initialize()
    713715        {
    714             //throw new NotImplementedException();
    715716        }
    716717
     
    731732        public void Pause()
    732733        {
    733             //throw new NotImplementedException();
    734734        }
    735735
  • trunk/CrypPlugins/HIGHT/HIGHTSettings.cs

    r116 r331  
    2222        private bool hasChanges = false;
    2323        private int action = 0; //0=encrypt, 1=decrypt
    24         //private int mode = 0; //0="ECB", 1="CBC", 2="CFB", 3="OFB"
    2524        private int padding = 0; //0="Zeros"=default, 1="None", 2="PKCS7"
    2625
    27         [ContextMenu("Action","Do you want the input data to be encrypted or decrypted?",1, DisplayLevel.Beginner, ContextMenuControlType.ComboBox, new int[] { 1, 2}, "Encrypt","Decrypt")]
     26        [ContextMenu("Action","Do you want the input data to be encrypted or decrypted?", 1, DisplayLevel.Beginner, ContextMenuControlType.ComboBox, new int[] { 1, 2}, "Encrypt","Decrypt")]
    2827        [TaskPane("Action", "Do you want the input data to be encrypted or decrypted?", null, 1, false, DisplayLevel.Beginner, ControlType.ComboBox, new string[] { "Encrypt", "Decrypt" })]
    2928        public int Action
    3029        {
    3130            get { return this.action; }
    32             set { this.action = (int)value; }
     31            set
     32            {
     33                if (((int)value) != padding) hasChanges = true;
     34                this.action = (int)value;
     35            }
    3336        }
    3437
    35         /*[ContextMenu("Chaining mode", "Select the block cipher mode of operation.", 2, DisplayLevel.Beginner, ContextMenuControlType.ComboBox, null, new String[] { "Electronic Code Book (ECB)", "Cipher Block Chaining (CBC)", "Cipher Feedback (CFB)" })]
    36         [TaskPane("Chaining Mode", "Select the block cipher mode of operation.", null, 2, false, DisplayLevel.Experienced, ControlType.ComboBox, new String[] { "Electronic Bode Book (ECB)", "Cipher Block Chaining (CBC)", "Cipher Feedback (CFB)" })]
    37         public int Mode
    38         {
    39             get { return this.mode; }
    40             set
    41             {
    42                 if (((int)value) != mode) hasChanges = true;
    43                 this.mode = (int)value;
    44                 //OnPropertyChanged("Mode");
    45             }
    46         }*/
    47 
    48         [ContextMenu("Padding mode", "Select a mode to fill partial data blocks.", 3, DisplayLevel.Beginner, ContextMenuControlType.ComboBox, null, "Zeros", "None", "PKCS7")]
    49         [TaskPane("Padding Mode", "Select a mode to fill partial data blocks.", "", 3, false, DisplayLevel.Experienced, ControlType.ComboBox, new String[] { "Zeros", "None", "PKCS7" })]
     38        [ContextMenu("Padding mode", "Select a mode to fill partial data blocks.", 2, DisplayLevel.Beginner, ContextMenuControlType.ComboBox, null, "Zeros", "None", "PKCS7")]
     39        [TaskPane("Padding Mode", "Select a mode to fill partial data blocks.", null, 2, false, DisplayLevel.Experienced, ControlType.ComboBox, new String[] { "Zeros", "None", "PKCS7" })]
    5040        public int Padding
    5141        {
     
    5545                if (((int)value) != padding) hasChanges = true;
    5646                this.padding = (int)value;
    57                 //OnPropertyChanged("Padding");
    5847            }
    5948        }
Note: See TracChangeset for help on using the changeset viewer.