Changeset 1113


Ignore:
Timestamp:
Jan 28, 2010, 4:15:10 PM (12 years ago)
Author:
weyers
Message:

DevTestMethods/TranspositionTest.cs created, Transposition Discription updated!

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrypPlugins/Transposition/Description/TranspositionDescript.xaml

    r827 r1113  
    1 <FlowDocument PagePadding="5,0,5,0" AllowDrop="True" NumberSubstitution.CultureSource="User" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
    2     <Paragraph><Run FontWeight="Bold" FontSize="14.6666666666667" xml:lang="de-de">
    3         <Run.TextDecorations>
    4             <TextDecoration Location="Underline" />
    5         </Run.TextDecorations>Transposition</Run>
    6     </Paragraph><Paragraph><Run FontSize="10.6666666666667">In a columnar transposition, the message is written out in rows of a fixed length, and then read out again column by column, and the columns are chosen in some scrambled order. Both the width of the rows and the permutation of the columns are usually defined by a keyword. For example, the word ZEBRAS is of length 6 (so the rows are of length 6), and the permutation is defined by the alphabetical order of the letters in the keyword. In this case, the order would be "</Run><Run FontWeight="Bold" FontSize="10.6666666666667">6 3 2 4 1 5</Run><Run FontSize="10.6666666666667">".</Run></Paragraph><Paragraph><Run FontSize="10.6666666666667" xml:space="preserve" /></Paragraph><Paragraph><Run FontSize="10.6666666666667">In a regular columnar transposition cipher, any spare spaces are filled with nulls; in an irregular columnar transposition cipher, the spaces are left blank. Finally, the message is read off in columns, in the order specified by the keyword. For example, suppose we use the keyword ZEBRAS and the message WE ARE DISCOVERED. FLEE AT ONCE. In a regular columnar transposition, we write this into the grid as:</Run></Paragraph><Paragraph><Run FontSize="10.6666666666667" xml:space="preserve" /></Paragraph><Paragraph><Run FontWeight="Bold" FontSize="10.6666666666667"><Run.TextDecorations><TextDecoration Location="Underline" /></Run.TextDecorations>6 3 2 4 1 5</Run></Paragraph><Paragraph><Run FontWeight="Bold" FontSize="10.6666666666667" xml:space="preserve">W E A R E D </Run></Paragraph><Paragraph><Run FontWeight="Bold" FontSize="10.6666666666667" xml:space="preserve">I S C O V E </Run></Paragraph><Paragraph><Run FontWeight="Bold" FontSize="10.6666666666667" xml:space="preserve">R E D F L E </Run></Paragraph><Paragraph><Run FontWeight="Bold" FontSize="10.6666666666667" xml:space="preserve">E A T O N C </Run></Paragraph><Paragraph><Run FontWeight="Bold" FontSize="10.6666666666667" xml:space="preserve">E Q K J E U </Run></Paragraph><Paragraph><Run FontSize="10.6666666666667" xml:space="preserve" /></Paragraph><Paragraph><Run FontSize="10.6666666666667">Providing five nulls (</Run><Run FontSize="10.6666666666667"><Run.TextDecorations><TextDecoration Location="Underline" /></Run.TextDecorations>QKJEU</Run><Run FontSize="10.6666666666667">) at the end. The ciphertext is then read off as:</Run></Paragraph><Paragraph><Run FontSize="10.6666666666667" xml:space="preserve" /></Paragraph><Paragraph><Run FontWeight="Bold" FontSize="10.6666666666667">EVLNE ACDTK ESEAQ ROFOJ DEECU WIREE</Run></Paragraph><Paragraph><Run FontSize="10.6666666666667" xml:space="preserve" /></Paragraph><Paragraph><Run FontSize="10.6666666666667">In the irregular case, the columns are not completed by nulls:</Run></Paragraph><Paragraph><Run FontSize="10.6666666666667" xml:space="preserve" /></Paragraph><Paragraph><Run FontWeight="Bold" FontSize="10.6666666666667"><Run.TextDecorations><TextDecoration Location="Underline" /></Run.TextDecorations>6 3 2 4 1 5</Run></Paragraph><Paragraph><Run FontWeight="Bold" FontSize="10.6666666666667" xml:space="preserve">W E A R E D </Run></Paragraph><Paragraph><Run FontWeight="Bold" FontSize="10.6666666666667" xml:space="preserve">I S C O V E </Run></Paragraph><Paragraph><Run FontWeight="Bold" FontSize="10.6666666666667" xml:space="preserve">R E D F L E </Run></Paragraph><Paragraph><Run FontWeight="Bold" FontSize="10.6666666666667" xml:space="preserve">E A T O N C </Run></Paragraph><Paragraph><Run FontWeight="Bold" FontSize="10.6666666666667" xml:space="preserve">E </Run></Paragraph><Paragraph><Run FontSize="10.6666666666667" xml:space="preserve" /></Paragraph><Paragraph><Run FontSize="10.6666666666667">This results in the following ciphertext:</Run></Paragraph><Paragraph><Run FontSize="10.6666666666667" xml:space="preserve" /></Paragraph><Paragraph><Run FontWeight="Bold" FontSize="10.6666666666667">EVLNA CDTES EAROF ODEEC WIREE</Run></Paragraph><Paragraph><Run FontSize="10.6666666666667" xml:space="preserve" /></Paragraph><Paragraph><Run FontSize="10.6666666666667">To decipher it, the recipient has to work out the column lengths by dividing the message length by the key length. Then he can write the message out in columns again, then re-order the columns by reforming the key word.</Run></Paragraph><Paragraph><Run FontSize="10.6666666666667" xml:space="preserve" /></Paragraph><Paragraph><Run FontSize="10.6666666666667">Columnar transposition continued to be used for serious purposes as a component of more complex ciphers at least into the 1950's.</Run></Paragraph><Paragraph><Run FontSize="10.6666666666667" xml:space="preserve" /></Paragraph><Paragraph><Run FontStyle="Italic" FontSize="10.6666666666667" xml:lang="de-de" xml:space="preserve">In Case of Combining two Transposition Plug-Ins: </Run></Paragraph><Paragraph><Run FontWeight="Bold" FontSize="10.6666666666667">Double transposition</Run><Run FontWeight="Bold" FontSize="10.6666666666667" xml:lang="de-de" xml:space="preserve"> </Run></Paragraph><Paragraph><Run FontSize="10.6666666666667" xml:space="preserve" /></Paragraph><Paragraph><Run FontSize="10.6666666666667">A single columnar transposition could be attacked by guessing possible column lengths, writing the message out in its columns (but in the wrong order, as the key is not yet known), and then looking for possible anagrams. Thus to make it stronger, a double transposition was often used. This is simply a columnar transposition applied twice. The same key can be used for both transpositions, or two different keys can be used.</Run></Paragraph><Paragraph><Run FontSize="10.6666666666667" xml:space="preserve" /></Paragraph><Paragraph><Run FontSize="10.6666666666667">As an example, we can take the result of the irregular columnar transposition in the previous section, and perform a second encryption with a different keyword, STRIPE, which gives the permutation "</Run><Run FontWeight="Bold" FontSize="10.6666666666667">564231</Run><Run FontSize="10.6666666666667">":</Run></Paragraph><Paragraph><Run FontSize="10.6666666666667" xml:space="preserve" /></Paragraph><Paragraph><Run FontWeight="Bold" FontSize="10.6666666666667" xml:space="preserve"><Run.TextDecorations><TextDecoration Location="Underline" /></Run.TextDecorations>5 6 4 2 3 1 </Run></Paragraph><Paragraph><Run FontWeight="Bold" FontSize="10.6666666666667">E V L N A C</Run></Paragraph><Paragraph><Run FontWeight="Bold" FontSize="10.6666666666667">D T E S E A</Run></Paragraph><Paragraph><Run FontWeight="Bold" FontSize="10.6666666666667">R O F O D E</Run></Paragraph><Paragraph><Run FontWeight="Bold" FontSize="10.6666666666667">E C W I R E</Run></Paragraph><Paragraph><Run FontWeight="Bold" FontSize="10.6666666666667">E</Run></Paragraph><Paragraph><Run FontSize="10.6666666666667" xml:space="preserve" /></Paragraph><Paragraph><Run FontSize="10.6666666666667" xml:space="preserve">As before, this is read off </Run><Run FontSize="10.6666666666667"><Run.TextDecorations><TextDecoration Location="Underline" /></Run.TextDecorations>columnwise</Run><Run FontSize="10.6666666666667" xml:space="preserve"> to give the ciphertext:</Run></Paragraph><Paragraph><Run FontSize="10.6666666666667" xml:space="preserve" /></Paragraph><Paragraph><Run FontWeight="Bold" FontSize="10.6666666666667">CAEEN SOIAE DRLEF WEDRE EVTOC
    7     </Run></Paragraph>
    8     <Paragraph>
    9        
    10         <Run FontSize="10.6666666666667" xml:space="preserve" /></Paragraph>
    11     <Paragraph><Run FontSize="10.6666666666667" xml:space="preserve" /></Paragraph>
    12     <Paragraph><Run FontSize="10.6666666666667" xml:lang="de-de" xml:space="preserve">source: </Run></Paragraph><Paragraph><Run FontSize="10.6666666666667" xml:lang="de-de">http://en.wikipedia.org/wiki/Transposition_cipher#Columnar_transposition</Run>
    13        
    14        
    15     </Paragraph>
    16     <Paragraph>
    17         <Run FontSize="10.6666666666667" xml:lang="de-de" xml:space="preserve">USAGE: </Run>
    18     </Paragraph>
    19     <Paragraph>
    20         <Run FontSize="10.6666666666667" xml:lang="de-de">The Transposition-plugin has two mandatory string-inputs. The first one is the inputtext and the second one is the keyword used in the en- or decryptionoperation.
    21 As outputs we have the en- or decrypted textstring.
    22         </Run></Paragraph>
    23 
    24     <Paragraph>
    25         <Run FontSize="10.6666666666667" xml:lang="de-de">
    26 In the taskpane the user can choose between en- or decrypting the inputtext in the field "action".
    27         </Run>
    28     </Paragraph>
    29 
    30     <Paragraph>
    31         <Run FontSize="10.6666666666667" xml:lang="de-de">
    32 The modes of "reading in", the "permutation of the read in text and the reading out can be adjusted in the fields below.
    33 The two diffrent modes are "by row" and "by column".
    34         </Run>
    35     </Paragraph>
    36     <Paragraph>
    37         <Run FontSize="10.6666666666667" xml:lang="de-de">
    38 (Attention: unclever settings can make Transposition encryption redundant.)
    39 
    40         </Run>
    41     </Paragraph>
    42 
    43 
    44     <Paragraph><Run FontSize="10.6666666666667" xml:space="preserve" />
    45     </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="14.6666666666667" xml:lang="de-de"><Run.TextDecorations><TextDecoration Location="Underline" /></Run.TextDecorations>Transposition</Run></Paragraph><Paragraph><Run FontWeight="Bold" FontSize="13.3333333333333" xml:lang="de-de"><Run.TextDecorations><TextDecoration Location="Underline" /></Run.TextDecorations>Introduction</Run></Paragraph><Paragraph><Run FontSize="10.6666666666667" xml:space="preserve">In a columnar transposition, the message is written out in rows of a fixed length, and then read out again column by column, and the columns are chosen in some scrambled order. Both the width of the rows and the permutation of the columns are usually defined by a keyword. </Run><Run FontSize="10.6666666666667" xml:lang="de-de">The transposition acts in three steps, reading in the plaintext into a matrix, permutation of the matrix and reading the cipher out of the matrix.</Run></Paragraph><Paragraph><Run FontWeight="Bold" FontSize="13.3333333333333" xml:lang="de-de"><Run.TextDecorations><TextDecoration Location="Underline" /></Run.TextDecorations>Settings</Run></Paragraph><Paragraph><Run FontSize="10.6666666666667" xml:lang="de-de">The Transposition-plugin has two mandatory string-inputs. The first one is the inputtext and the second one is the keyword used in the en- or decryptionoperation. As outputs we have the en- or decrypted textstring.</Run></Paragraph><Paragraph><Run FontSize="10.6666666666667" xml:lang="de-de">In the taskpane the user can choose between en- or decrypting the inputtext in the field "action".</Run></Paragraph><Paragraph><Run FontSize="10.6666666666667" xml:lang="de-de">In the field "read in" and "read out" , you can choose the mode in which the text is read in and read out . The two diffrent modes are "by row" and "by column" which means the text is read verticaly or horizontaly.</Run></Paragraph><Paragraph><Run FontSize="10.6666666666667" xml:lang="de-de" xml:space="preserve">The actual mode of the Transformation can be set in the field permutation. You can choose between the permutation by column and by row. </Run></Paragraph><Paragraph><Run FontSize="10.6666666666667" xml:lang="de-de">While the presentation is shown you can change the speed of the presentation by moving the slider "Presentation Speed"(left most slowest mode).</Run></Paragraph><Paragraph><Run FontSize="10.6666666666667" xml:lang="de-de" xml:space="preserve">In the "Number Representation Mode" field you can change between US-ASCII  or hexdecimal represenation of the data. Unprintable characters, for example carriage return, are displayed as their hexadicmal value, introduced by a "/".</Run></Paragraph><Paragraph><Run FontSize="10.6666666666667" xml:lang="de-de">(Attention: unclever settings can make Transposition encryption redundant.)</Run></Paragraph><Paragraph><Run FontWeight="Bold" FontSize="13.3333333333333" xml:lang="de-de"><Run.TextDecorations><TextDecoration Location="Underline" /></Run.TextDecorations>Function</Run></Paragraph><Paragraph><Run FontSize="10.6666666666667">For example, the word ZEBRAS is of length 6 (so the rows are of length 6), and the permutation is defined by the alphabetical order of the letters in the keyword. In this case, the order would be "</Run><Run FontWeight="Bold" FontSize="10.6666666666667">6 3 2 4 1 5</Run><Run FontSize="10.6666666666667">".</Run></Paragraph><Paragraph><Run FontSize="10.6666666666667">In a regular columnar transposition cipher, any spare spaces are filled with nulls; in an irregular columnar transposition cipher, the spaces are left blank. Finally, the message is read off in columns, in the order specified by the keyword. For example, suppose we use the keyword ZEBRAS and the message WE ARE DISCOVERED. FLEE AT ONCE. In a regular columnar transposition, we write this into the grid as:</Run></Paragraph><Paragraph><Run FontSize="10.6666666666667" xml:space="preserve" /></Paragraph><Paragraph><Run FontWeight="Bold" FontSize="10.6666666666667"><Run.TextDecorations><TextDecoration Location="Underline" /></Run.TextDecorations>6 3 2 4 1 5</Run></Paragraph><Paragraph><Run FontWeight="Bold" FontSize="10.6666666666667" xml:space="preserve">W E A R E D </Run></Paragraph><Paragraph><Run FontWeight="Bold" FontSize="10.6666666666667" xml:space="preserve">I S C O V E </Run></Paragraph><Paragraph><Run FontWeight="Bold" FontSize="10.6666666666667" xml:space="preserve">R E D F L E </Run></Paragraph><Paragraph><Run FontWeight="Bold" FontSize="10.6666666666667" xml:space="preserve">E A T O N C </Run></Paragraph><Paragraph><Run FontWeight="Bold" FontSize="10.6666666666667" xml:space="preserve">E Q K J E U </Run></Paragraph><Paragraph><Run FontSize="10.6666666666667" xml:space="preserve" /></Paragraph><Paragraph><Run FontSize="10.6666666666667">Providing five nulls (</Run><Run FontSize="10.6666666666667"><Run.TextDecorations><TextDecoration Location="Underline" /></Run.TextDecorations>QKJEU</Run><Run FontSize="10.6666666666667">) at the end. The ciphertext is then read off as:</Run></Paragraph><Paragraph><Run FontSize="10.6666666666667" xml:space="preserve" /></Paragraph><Paragraph><Run FontWeight="Bold" FontSize="10.6666666666667">EVLNE ACDTK ESEAQ ROFOJ DEECU WIREE</Run></Paragraph><Paragraph><Run FontSize="10.6666666666667" xml:space="preserve" /></Paragraph><Paragraph><Run FontSize="10.6666666666667">In the irregular case, the columns are not completed by nulls:</Run></Paragraph><Paragraph><Run FontSize="10.6666666666667" xml:space="preserve" /></Paragraph><Paragraph><Run FontWeight="Bold" FontSize="10.6666666666667"><Run.TextDecorations><TextDecoration Location="Underline" /></Run.TextDecorations>6 3 2 4 1 5</Run></Paragraph><Paragraph><Run FontWeight="Bold" FontSize="10.6666666666667" xml:space="preserve">W E A R E D </Run></Paragraph><Paragraph><Run FontWeight="Bold" FontSize="10.6666666666667" xml:space="preserve">I S C O V E </Run></Paragraph><Paragraph><Run FontWeight="Bold" FontSize="10.6666666666667" xml:space="preserve">R E D F L E </Run></Paragraph><Paragraph><Run FontWeight="Bold" FontSize="10.6666666666667" xml:space="preserve">E A T O N C </Run></Paragraph><Paragraph><Run FontWeight="Bold" FontSize="10.6666666666667" xml:space="preserve">E </Run></Paragraph><Paragraph><Run FontSize="10.6666666666667" xml:space="preserve" /></Paragraph><Paragraph><Run FontSize="10.6666666666667">This results in the following ciphertext:</Run></Paragraph><Paragraph><Run FontSize="10.6666666666667" xml:space="preserve" /></Paragraph><Paragraph><Run FontWeight="Bold" FontSize="10.6666666666667">EVLNA CDTES EAROF ODEEC WIREE</Run></Paragraph><Paragraph><Run FontSize="10.6666666666667" xml:space="preserve" /></Paragraph><Paragraph><Run FontSize="10.6666666666667">To decipher it, the recipient has to work out the column lengths by dividing the message length by the key length. Then he can write the message out in columns again, then re-order the columns by reforming the key word.</Run></Paragraph><Paragraph><Run FontSize="10.6666666666667" xml:space="preserve" /></Paragraph><Paragraph><Run FontSize="10.6666666666667">Columnar transposition continued to be used for serious purposes as a component of more complex ciphers at least into the 1950's.</Run></Paragraph><Paragraph><Run FontSize="10.6666666666667" xml:space="preserve" /></Paragraph><Paragraph><Run FontStyle="Italic" FontSize="10.6666666666667" xml:lang="de-de" xml:space="preserve">In Case of Combining two Transposition Plug-Ins: </Run></Paragraph><Paragraph><Run FontWeight="Bold" FontSize="10.6666666666667">Double transposition</Run><Run FontWeight="Bold" FontSize="10.6666666666667" xml:lang="de-de" xml:space="preserve"> </Run></Paragraph><Paragraph><Run FontSize="10.6666666666667" xml:space="preserve" /></Paragraph><Paragraph><Run FontSize="10.6666666666667">A single columnar transposition could be attacked by guessing possible column lengths, writing the message out in its columns (but in the wrong order, as the key is not yet known), and then looking for possible anagrams. Thus to make it stronger, a double transposition was often used. This is simply a columnar transposition applied twice. The same key can be used for both transpositions, or two different keys can be used.</Run></Paragraph><Paragraph><Run FontSize="10.6666666666667" xml:space="preserve" /></Paragraph><Paragraph><Run FontSize="10.6666666666667">As an example, we can take the result of the irregular columnar transposition in the previous section, and perform a second encryption with a different keyword, STRIPE, which gives the permutation "</Run><Run FontWeight="Bold" FontSize="10.6666666666667">564231</Run><Run FontSize="10.6666666666667">":</Run></Paragraph><Paragraph><Run FontSize="10.6666666666667" xml:space="preserve" /></Paragraph><Paragraph><Run FontWeight="Bold" FontSize="10.6666666666667" xml:space="preserve"><Run.TextDecorations><TextDecoration Location="Underline" /></Run.TextDecorations>5 6 4 2 3 1 </Run></Paragraph><Paragraph><Run FontWeight="Bold" FontSize="10.6666666666667">E V L N A C</Run></Paragraph><Paragraph><Run FontWeight="Bold" FontSize="10.6666666666667">D T E S E A</Run></Paragraph><Paragraph><Run FontWeight="Bold" FontSize="10.6666666666667">R O F O D E</Run></Paragraph><Paragraph><Run FontWeight="Bold" FontSize="10.6666666666667">E C W I R E</Run></Paragraph><Paragraph><Run FontWeight="Bold" FontSize="10.6666666666667">E</Run></Paragraph><Paragraph><Run FontSize="10.6666666666667" xml:space="preserve" /></Paragraph><Paragraph><Run FontSize="10.6666666666667" xml:space="preserve">As before, this is read off </Run><Run FontSize="10.6666666666667"><Run.TextDecorations><TextDecoration Location="Underline" /></Run.TextDecorations>columnwise</Run><Run FontSize="10.6666666666667" xml:space="preserve"> to give the ciphertext:</Run></Paragraph><Paragraph><Run FontSize="10.6666666666667" xml:space="preserve" /></Paragraph><Paragraph><Run FontWeight="Bold" FontSize="10.6666666666667">CAEEN SOIAE DRLEF WEDRE EVTOC</Run></Paragraph><Paragraph><Run FontSize="10.6666666666667" xml:space="preserve" /></Paragraph><Paragraph><Run FontWeight="Bold" FontSize="13.3333333333333"><Run.TextDecorations><TextDecoration Location="Underline" /></Run.TextDecorations>Relation to other Plugins</Run></Paragraph><Paragraph><Run FontSize="10.6666666666667" xml:lang="de-de" xml:space="preserve">Mandatory inputs are two Textinputs (plaintext and key) and one Textoutput (cipher). </Run></Paragraph><Paragraph><Run FontSize="10.6666666666667" xml:lang="de-de" xml:space="preserve">The Transposition-Plugin provides its service the Transposition Analyser-Plugin as a slave.  </Run></Paragraph><Paragraph><Run FontSize="10.6666666666667" xml:lang="de-de" xml:space="preserve" /></Paragraph><Paragraph><Run FontSize="10.6666666666667" xml:lang="de-de" xml:space="preserve">source: </Run></Paragraph><Paragraph><Run FontSize="10.6666666666667" xml:lang="de-de">http://en.wikipedia.org/wiki/Transposition_cipher#Columnar_transposition</Run></Paragraph><Paragraph><Run FontWeight="Bold" FontSize="13.3333333333333" xml:lang="de-de" xml:space="preserve"><Run.TextDecorations><TextDecoration Location="Underline" /></Run.TextDecorations></Run></Paragraph><Paragraph><Run FontSize="10.6666666666667" xml:space="preserve" /></Paragraph></FlowDocument>
  • trunk/DevTestMethods/DevTestMethods.csproj

    r1091 r1113  
    33    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    44    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    5     <ProductVersion>9.0.30729</ProductVersion>
     5    <ProductVersion>9.0.21022</ProductVersion>
    66    <SchemaVersion>2.0</SchemaVersion>
    77    <ProjectGuid>{F4CCBE43-F19E-49A1-982E-B66919F5D701}</ProjectGuid>
     
    6363    <Compile Include="pkcsTest.cs" />
    6464    <Compile Include="TigerTest.cs" />
     65    <Compile Include="TranspositionTest.cs" />
    6566    <Compile Include="TwofishTest.cs" />
    6667    <Compile Include="WhirlpoolTest.cs" />
     
    8384      <Name>PKCS5</Name>
    8485    </ProjectReference>
     86    <ProjectReference Include="..\CrypPlugins\Transposition\Transposition.csproj">
     87      <Project>{37D80203-C651-4396-8F5B-D67B7EC62763}</Project>
     88      <Name>Transposition</Name>
     89    </ProjectReference>
    8590    <ProjectReference Include="..\SSCext\SSCext.csproj">
    8691      <Project>{E46A6AA6-56EE-4AE5-8725-DCD07DC95527}</Project>
Note: See TracChangeset for help on using the changeset viewer.