Changeset 1267


Ignore:
Timestamp:
Apr 1, 2010, 10:49:45 AM (12 years ago)
Author:
pretzsch
Message:

o MD5Collider: Removed check for test run, changed description

Location:
trunk/CrypPlugins/MD5Collider
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrypPlugins/MD5Collider/Algorithm/KlimaTunnelsCollider.cs

    r1171 r1267  
    1 using System;
     1/*
     2 * This class is based of Vlastimil Klima's implementation of his
     3 * tunneling technique. It is a port of the source code provided
     4 * by him as "source code version 1".
     5 */
     6
     7using System;
    28using System.Collections.Generic;
    39using System.Linq;
  • trunk/CrypPlugins/MD5Collider/Algorithm/StevensCollider.cs

    r1187 r1267  
    1 using System;
     1/*
     2 * This class is based on the code of Marc Stevens'
     3 * "fast collision generator", version 1.0.0.5,
     4 * which is used with his permission.
     5 *
     6 * The disclaimer of the original source code is below:
     7 
     8Version
     9=======
     10version 1.0.0.5, April 2006.
     11
     12Copyright
     13=========
     14© M. Stevens, 2006. All rights reserved.
     15
     16Disclaimer
     17==========
     18This software is provided as is. Use is at the user's risk.
     19No guarantee whatsoever is given on how it may function or malfunction.
     20Support cannot be expected.
     21This software is meant for scientific and educational purposes only.
     22It is forbidden to use it for other than scientific or educational purposes.
     23In particular, commercial and malicious use is not allowed.
     24Further distribution of this software, by whatever means, is not allowed
     25without our consent.
     26This includes publication of source code or executables in printed form,
     27on websites, newsgroups, CD-ROM's, etc.
     28Changing the (source) code without our consent is not allowed.
     29In all versions of the source code this disclaimer, the copyright
     30notice and the version number should be present.
     31
     32*/
     33
     34using System;
    235using System.Collections.Generic;
    336using System.Linq;
     
    538using System.Security.Cryptography;
    639using System.Threading;
     40
     41
     42
    743
    844namespace Cryptool.Plugins.MD5Collider.Algorithm
  • trunk/CrypPlugins/MD5Collider/DetailedDescription/Description.xaml

    r1183 r1267  
    1 <FlowDocument PagePadding="5,0,5,0" AllowDrop="True" NumberSubstitution.CultureSource="User" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"><Paragraph><Run FontWeight="Bold" FontSize="18.6666666666667" xml:lang="de-de">MD5 collider</Run></Paragraph><Paragraph><Run FontSize="13.3333333333333" xml:lang="de-de" xml:space="preserve">The MD5 collider plugin allows you to create two blocks of differing binary data which either hash to the same MD5 value or can be used as part of data hashing to the same MD5 value. These blocks will always be exactly 128 bytes long. They are output as byte[] and stream objects. The plugin takes two optional inputs. </Run></Paragraph><Paragraph><Run FontSize="13.3333333333333" xml:lang="de-de" xml:space="preserve">The first is a </Run><Run FontWeight="Bold" FontSize="13.3333333333333" xml:lang="de-de">random seed</Run><Run FontSize="13.3333333333333" xml:lang="de-de">. This input - if connected - allows you to get a reproducable result: Two runs of the collider with the same random seed will generate the same binary output in approximately the same running time. If left unconnected, the output and running time will be different for each execution.</Run></Paragraph><Paragraph><Run FontSize="13.3333333333333" xml:lang="de-de" xml:space="preserve">As a second input, an optional </Run><Run FontWeight="Bold" FontSize="13.3333333333333" xml:lang="de-de">"prefix" parameter</Run><Run FontSize="13.3333333333333" xml:lang="de-de" xml:space="preserve"> can be given. If this parameter is omitted, you will simply receive two blocks of output that hash to the same MD5 value. Due to the nature of MD5, appending identical data to both of these blocks will still result in them hashing to the same value. However, prepending identical data to the blocks will break the collision.</Run></Paragraph><Paragraph><Run FontSize="13.3333333333333" xml:lang="de-de">If you want to prepend data to build your collision data, you should set this data as the prefix parameter. It must have a length that is a multiple of 64 bytes. When it is set to a non-empty value, an intermediate hash value is calculated from the input and used in the computation instead of the default starting IHV, resulting in different output blocks which will not hash to the same MD5 value on their own. However, if you concatenate the generated blocks B1 and B2 to the given prefix data P so that you receive two new blocks (P || B1) and (P || B2), they will have the same MD5. You can then append more identical data without breaking the collision. Thus, using the prefix parameter, you may create colliding blocks (Prefix || C1 || Postfix), (Prefix || C2 || Postfix) with identical pre- and postfixes.</Run></Paragraph></FlowDocument>
     1<FlowDocument PagePadding="5,0,5,0" AllowDrop="True" NumberSubstitution.CultureSource="User" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"><Paragraph><Run FontWeight="Bold" FontSize="18.6666666666667" xml:lang="de-de">MD5 collider</Run></Paragraph><Paragraph><Run FontSize="13.3333333333333" xml:lang="de-de" xml:space="preserve">The MD5 collider plugin allows you to create two blocks of differing binary data which either hash to the same MD5 value or can be used as part of data hashing to the same MD5 value. These blocks will always be exactly 128 bytes long. They are output as byte[] and stream objects. The plugin takes two optional inputs. </Run></Paragraph><Paragraph><Run FontSize="13.3333333333333" xml:lang="de-de" xml:space="preserve">The first is a </Run><Run FontWeight="Bold" FontSize="13.3333333333333" xml:lang="de-de">random seed</Run><Run FontSize="13.3333333333333" xml:lang="de-de">. This input - if connected - allows you to get a reproducable result: Two runs of the collider with the same random seed will generate the same binary output in approximately the same running time. If left unconnected, the output and running time will be different for each execution.</Run></Paragraph><Paragraph><Run FontSize="13.3333333333333" xml:lang="de-de" xml:space="preserve">As a second input, an optional </Run><Run FontWeight="Bold" FontSize="13.3333333333333" xml:lang="de-de">"prefix" parameter</Run><Run FontSize="13.3333333333333" xml:lang="de-de" xml:space="preserve"> can be given. If this parameter is omitted, you will simply receive two blocks of output that hash to the same MD5 value. Due to the nature of MD5, appending identical data to both of these blocks will still result in them hashing to the same value. However, prepending identical data to the blocks will break the collision.</Run></Paragraph><Paragraph><Run FontSize="13.3333333333333" xml:lang="de-de">If you want to prepend data to build your collision data, you should set this data as the prefix parameter. It must have a length that is a multiple of 64 bytes. When it is set to a non-empty value, an intermediate hash value is calculated from the input and used in the computation instead of the default starting IHV, resulting in different output blocks which will not hash to the same MD5 value on their own. However, if you concatenate the generated blocks B1 and B2 to the given prefix data P so that you receive two new blocks (P || B1) and (P || B2), they will have the same MD5. You can then append more identical data without breaking the collision. Thus, using the prefix parameter, you may create colliding blocks (Prefix || C1 || Postfix), (Prefix || C2 || Postfix) with identical pre- and postfixes.</Run></Paragraph><Paragraph><Run FontWeight="Bold" FontSize="13.3333333333333" xml:lang="de-de">Credits</Run><LineBreak /><Run FontSize="13.3333333333333" xml:lang="de-de">This plugin is a port of the "fast collision generator" version 1.0.0.5 by Marc Stevens. The original C++ source code and more information are available at http://www.win.tue.nl/hashclash/.</Run></Paragraph></FlowDocument>
  • trunk/CrypPlugins/MD5Collider/MD5Collider.cs

    r1184 r1267  
    126126        }
    127127
    128         public static bool testRun = true;
    129 
    130128        public void Execute()
    131129        {
    132             // TODO: EXTREMELY DIRTY IMPROVEME!
    133             // This exists to prevent the plugin from frezzing Cryptool when test-running at startup
    134             if (testRun)
    135             {
    136                 testRun = false;
    137                 return;
    138             }
    139 
    140130            ProgressChanged(0.5, 1.0);
    141131
     
    146136                if (Prefix.Length % 64 != 0)
    147137                {
    148                     GuiLogMessage("Prefix bytes must be a multiple of 64 bytes long!", NotificationLevel.Error);
     138                    GuiLogMessage("Prefixed data must be a multiple of 64 bytes long!", NotificationLevel.Error);
    149139                    return;
    150140                }
Note: See TracChangeset for help on using the changeset viewer.