4yeo11

所属分类:Pascal/Delphi编程
开发工具:Delphi
文件大小:348KB
下载次数:3
上传日期:2009-08-26 23:17:02
上 传 者krisda
说明:  4Yeo is an open source encryption algorithm created in Borland Delphi 5. The encryption unit plus example source code is included with the package. 4Yeo is always in the works so check for new versions at www.Sequreware.com

文件列表:
4yeo11\4yeo 1.1 (0, 2003-07-25)
4yeo11\4yeo 1.1\Bin (0, 2003-07-25)
4yeo11\4yeo 1.1\Bin\File encryption.exe (332800, 2003-07-01)
4yeo11\4yeo 1.1\Bin\String encryption.exe (312320, 2003-07-01)
4yeo11\4yeo 1.1\Documentation (0, 2003-07-25)
4yeo11\4yeo 1.1\Encryption unit source (0, 2003-07-25)
4yeo11\4yeo 1.1\Encryption unit source\Encrypt.pas (6564, 2003-07-06)
4yeo11\4yeo 1.1\Example source (0, 2003-07-25)
4yeo11\4yeo 1.1\Example source\File encryption (0, 2003-07-25)
4yeo11\4yeo 1.1\Example source\File encryption\Encrypt.pas (6863, 2003-07-06)
4yeo11\4yeo 1.1\Example source\File encryption\Project1.cfg (386, 1999-11-09)
4yeo11\4yeo 1.1\Example source\File encryption\Project1.dof (1471, 1999-11-09)
4yeo11\4yeo 1.1\Example source\File encryption\Project1.dpr (188, 1999-11-09)
4yeo11\4yeo 1.1\Example source\File encryption\Project1.res (876, 1999-11-09)
4yeo11\4yeo 1.1\Example source\File encryption\Unit1.dfm (1913, 2003-07-01)
4yeo11\4yeo 1.1\Example source\File encryption\Unit1.pas (4154, 2003-07-01)
4yeo11\4yeo 1.1\Example source\String encryption (0, 2003-07-25)
4yeo11\4yeo 1.1\Example source\String encryption\Project1.cfg (386, 1999-11-08)
4yeo11\4yeo 1.1\Example source\String encryption\Project1.dof (1471, 1999-11-08)
4yeo11\4yeo 1.1\Example source\String encryption\Project1.dpr (188, 1999-11-08)
4yeo11\4yeo 1.1\Example source\String encryption\Project1.res (876, 1999-11-08)
4yeo11\4yeo 1.1\Example source\String encryption\Unit1.dfm (1556, 2000-03-05)
4yeo11\4yeo 1.1\Example source\String encryption\Unit1.pas (1412, 2000-03-05)
4yeo11 (0, 2003-07-25)

4Yeo 1.1 Information Written by chris@sequreware.com 4Yeo is an open source encryption algorithm written in Delphi 5. Release notes 4Yeo 1.1 uses almost exactly the same algorithm as 4Yeo 1.0 but large enhancements have been made to the code which has greatly improved speed and performance. Minor changes have been made to the file encryption example code, check the compiled version in the bin\ directory and the source in the example source\file encryption\ directory for more information. I have also put together proper documentation detailing the algorithm itself. Algorithm information The basic purpose of the algorithm is to create a map of values using a key and to encrypt the source data using that map. The first step of the algorithm is to increase the ordinal value of each character in the key by the total length of the key, so the key abc would become def. This is to obscure the final appearance of the encrypted data. The algorithm will not work correctly if the same character is used twice in the key, so the next step is to remove repeated characters in the key, this is done by reading each character in the key removing every instance of the character after the original occurrence. The key needs to be 10 bytes or more in length so if the key is less than 10 bytes the algorithm adds characters to the key. This can't be done randomly, and the same procedure is used in all circumstances. A jump length is used, which is equal to the length of the key after it has had repeated characters removed is used, this will be labelled JMP. An integer value equal to the oridnal value of the first character in the key plus JMP is created, this will be labelled FCJ. The procedure repitively incriments FCJ by JMP and uses Y as an ordinal value, if the character represented by FCJ is not found in the key it is added to it, this is done until the length of the key is equal to ten. The next step is to convert each character in the source data to it's ordinal value, in order for the algorithm to work correctly the converted source data needs to divisible by 2. To do this, the ordinal value of each character needs to be four bytes in length, the largest ordinal value for a standrad ASCII character is 255 so atleast one 0 will always be needed to be added to the ordinal value. Add 0's to the front of the returned ordinal value until the length is four. The converted source data will be labelled DAT. The algorithm reads and encrypts DAT two bytes at a time, because DAT is filled with only integers, the only possible values that could come from reading 2 bytes are 00-99. 100 values need to be created from the key to replace all the possible values. For every character in the key (which will be labelled K) you need to go through the key and add each character in the key to K, giving you a 2 byte value each time. An easier way to explain this is through an example. Given the key ABC, the following values would be generated. AA,AB,AC,BA,BB,BC,CA,CB,CC You can see that for every letter in the key, all the letters in the key are used in combination with it. AA represents the value 00, AB=01, AC=02 etc. The last step is to read DAT 2 bytes at a time and replace the integer values with the values generated from the key. The result will be a string of seemingly random characters which will be exactly 4 times the original size of the input stream/file. Reversing the encryption Firstly you need to generate the 100 values from the key. Then, read the input data 2 bytes at a time and reverse the value back to the integer value it originally would have been (e.g. encryption(01->AB) decryption (AB->01)). You will now have a long line of integers, read this 4 bytes at a time and convert the integer value to it's original ordinal value. The result will be the original file before it was encrypted. If a wrong key is used, the algorithm will still work but it will generate data that has no resemblence to the original non-encrypted data. If you have questions, bugs or anything else regarding the 4Yeo algorithm feel free to contact me at chris@sequreware.com.

近期下载者

相关文件


收藏者