Changeset 155


Ignore:
Timestamp:
Dec 16, 2008, 8:48:44 AM (13 years ago)
Author:
Gerhard Junker
Message:

Plugin URLs filled
Source comments - references added
twofish partial added

Location:
trunk
Files:
2 added
5 edited

Legend:

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

    r138 r155  
    1111//////////////////////////////////////////////////////////////////////////////////////////////////
    1212
     13// see http://tools.ietf.org/html/rfc2898
     14// based on ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-5v2/pkcs5v2_1.pdf
     15
     16
    1317using System;
    1418using System.Collections.Generic;
     
    2529namespace PKCS5
    2630{
    27   [Author("Gerhard Junker", null, "private project member", "http://www.uni-siegen.de")]
    28   [PluginInfo(false, "PKCS#5", "PKCS#5 V2.1 Hash", "", "PKCS5/PKCS5.png")]
     31  [Author("Gerhard Junker", null, "private project member", null)]
     32  [PluginInfo(false, "PKCS#5", "PKCS#5 V2.1 Hash", "http://tools.ietf.org/html/rfc2898", "PKCS5/PKCS5.png")]
    2933  public class PKCS5 : IHash
    3034  {
  • trunk/CrypPlugins/Tiger/Tiger.cs

    r142 r155  
    1212
    1313
     14// read more about Tiger
    1415//
    15 // based on an VisualBasic implementation of Markus Hahn - Thanks.
    16 // THIS is the WEAK version 1!!!
    17 // more at http://www.cs.technion.ac.il/~biham/Reports/Tiger/
     16// http://en.wikipedia.org/wiki/Tiger_(cryptography)
     17// http://de.wikipedia.org/wiki/Tiger_(Hashfunktion)
     18// http://www.cs.technion.ac.il/~biham/Reports/Tiger/
    1819//
     20// based first on an VisualBasic implementation of Markus Hahn - Thanks.
     21// from http://www.hotpixel.net/software.html
     22// and changed to fit more the published algorithm
    1923
    2024using System;
     
    3438{
    3539
    36         [Author("Gerhard Junker", null, "private project member", "http://www.uni-siegen.de")]
    37         [PluginInfo(false, "Tiger", "Tiger2 V1.0.2 Hash", "", "Tiger/Tiger1.png")]
     40        [Author("Gerhard Junker", null, "private project member", null)]
     41  [PluginInfo(false, "Tiger", "Tiger2 V1.0.2 Hash",
     42    "http://en.wikipedia.org/wiki/Tiger_(cryptography)", "Tiger/Tiger1.png")]
    3843        public class Tiger : IHash
    3944        {
     
    141146                        set
    142147                        {
    143                                 if (null == value)
    144                                         return;
    145 
    146                                 if (inputCanal != dataCanal.none && inputCanal != dataCanal.streamCanal)
    147                                         GuiLogMessage("Duplicate input data not allowed!", NotificationLevel.Error);
    148                                 inputCanal = dataCanal.streamCanal;
     148        if (null == value)
     149        {
     150          inputdata = new byte[0];
     151          return;
     152        }
     153        //if (inputCanal != dataCanal.none && inputCanal != dataCanal.streamCanal)
     154        //  GuiLogMessage("Duplicate input data not allowed!", NotificationLevel.Error);
     155        //inputCanal = dataCanal.streamCanal;
    149156
    150157                                long len = value.Length;
     
    173180                        set
    174181                        {
    175                                 if (inputCanal != dataCanal.none && inputCanal != dataCanal.byteCanal)
    176                                         GuiLogMessage("Duplicate Data data not allowed!", NotificationLevel.Error);
    177                                 inputCanal = dataCanal.byteCanal;
    178 
     182        //if (inputCanal != dataCanal.none && inputCanal != dataCanal.byteCanal)
     183        //  GuiLogMessage("Duplicate Data data not allowed!", NotificationLevel.Error);
     184        //inputCanal = dataCanal.byteCanal;
     185        if (null == value)
     186        {
     187          inputdata = new byte[0];
     188          return;
     189        }
    179190                                long len = value.Length;
    180191                                inputdata = new byte[len];
     
    243254                                return this.outputData;
    244255                        }
    245                         //set
    246                         //{
    247                         //    if (outputData != value)
    248                         //    {
    249                         //        this.outputData = value;
    250                         //    }
    251                         //    NotifyUpdateOutput();
    252                         //}
    253256                }
    254257
  • trunk/CrypPlugins/Whirlpool/WhirlpoolPlugin.cs

    r142 r155  
    1111//////////////////////////////////////////////////////////////////////////////////////////////////
    1212
     13// The Whirlpool algorithm was developed by
     14// Paulo S. L. M. Barreto and Vincent Rijmen</a>.
     15//
     16// This implementation is based on the reference implementation found at
     17// http://www.larc.usp.br/~pbarreto/whirlpool.zip
     18// .. and moved from C to C#
     19
     20// Read more at
     21// http://en.wikipedia.org/wiki/Whirlpool_(cryptography)
     22// http://de.wikipedia.org/wiki/Whirlpool_(Algorithmus)
     23// http://www.larc.usp.br/~pbarreto/WhirlpoolPage.html
     24
     25
     26 
    1327using System;
    1428using System.Collections.Generic;
     
    2640{
    2741  [Author("Gerhard Junker", null, "private project member", null)]
    28   [PluginInfo(false, "Whirlpool", "Whirlpool hash function", "", "Whirlpool/Whirlpool1.png")]
     42  [PluginInfo(false, "Whirlpool", "Whirlpool hash function",
     43    "http://en.wikipedia.org/wiki/Whirlpool_(cryptography)", "Whirlpool/Whirlpool1.png")]
    2944  public class WPHash : IHash
    3045  {
     
    8398    private static byte[] empty = { };
    8499    private byte[] input = empty;
    85     private dataCanal inputCanal = dataCanal.none;
     100    //private dataCanal inputCanal = dataCanal.none;
    86101
    87102    /// <summary>
     
    109124      set
    110125      {
    111         if (inputCanal != dataCanal.none && inputCanal != dataCanal.streamCanal)
    112           GuiLogMessage("Duplicate input key not allowed!", NotificationLevel.Error);
    113         inputCanal = dataCanal.streamCanal;
     126        //if (inputCanal != dataCanal.none && inputCanal != dataCanal.streamCanal)
     127        //  GuiLogMessage("Duplicate input key not allowed!", NotificationLevel.Error);
     128        //inputCanal = dataCanal.streamCanal;
    114129
    115130        if (null == value)
     
    141156      set
    142157      {
    143         if (inputCanal != dataCanal.none && inputCanal != dataCanal.byteCanal)
    144           GuiLogMessage("Duplicate input data not allowed!", NotificationLevel.Error);
    145         inputCanal = dataCanal.byteCanal;
     158        //if (inputCanal != dataCanal.none && inputCanal != dataCanal.byteCanal)
     159        //  GuiLogMessage("Duplicate input data not allowed!", NotificationLevel.Error);
     160        //inputCanal = dataCanal.byteCanal;
    146161
    147162        if (null == value)
  • trunk/SSCext/SSC2fish.cs

    r148 r155  
    2727  /// </summary>
    2828  [ComVisibleAttribute(true)]
    29   class TWOFISH : SymmetricAlgorithm
     29  partial class TWOFISH : SymmetricAlgorithm
    3030  {
    3131    private const int   BLOCK_SIZE   = 128;
     
    6767        IV = rgbIV;
    6868
    69       // ToDo
    70       throw new NotImplementedException();
     69      return new TwofishEncryption(KeySize, ref KeyValue, ref IVValue, ModeValue,
     70        TWOFISH.EncryptionDirection.Decrypting);
    7171    }
    7272
     
    8686        IV = rgbIV;
    8787
    88       // ToDo
    89       throw new NotImplementedException();
     88      return new TwofishEncryption(KeySize, ref KeyValue, ref IVValue, ModeValue,
     89        TWOFISH.EncryptionDirection.Encrypting);
    9090    }
    9191
     
    135135        ModeValue = value;
    136136      }
    137 
    138137    }
    139138  }
  • trunk/SSCext/SSCext.csproj

    r148 r155  
    5252    <Compile Include="SSCTiger2.cs" />
    5353    <Compile Include="SSCwhirl.cs" />
     54    <Compile Include="TwofishBase.cs" />
     55    <Compile Include="TwofishEncryption.cs" />
    5456  </ItemGroup>
    5557  <ItemGroup>
Note: See TracChangeset for help on using the changeset viewer.