|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#16
|
|||
|
|||
|
Its been another month
, i'm still waiting.If anyone knows how it works it would be greatly appreciated. |
|
#17
|
|||
|
|||
|
You know, if it's that important to you, perhaps you should hire someone. I doubt anyone here is going to do any more work on this for you.
__________________
This is a sig, and not a necessarily a comment on the OP: Please don't be a help vampire! |
|
#18
|
||||
|
||||
|
Quote:
Breaking cryptography is hard, time-consuming, and likely not high on many people's recreation to-do lists.
__________________
- "Cryptographically secure linear feedback shift register based stream ciphers" -- a phrase that'll get any party started. - Why know the ordinary when you can understand the extraordinary? - Sponsor my caffeine addiction! (36.70 USD recieved so far -- Latest donor: Mark Foxvog) |
|
#19
|
|||
|
|||
|
00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
a..b..c..d..e..f..g..h..i..j..k..l..m..n..o..p 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F q..r..s..t..u..v..w..x..y..z..A..B..C..D..E..F 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F G..H..I..J..K..L..M..N..O..P..Q..R..S..T..U..V 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F W..X..Y..Z..0..1..2..3..4..5..6..7..8..9..-.._ You have what in fact turns out to be an extremely simple substitution cipher, which functions as follows. I'll use part of one of the key/input/output triads that you provided, as the example. Key: P0oz (50 30 6F 7A) Input: SSSS (53 53 53 53) Output: vt1Z0Y_9 (76 74 31 5A 30 59 5F 39) For each character of the Input, the cipher looks at the ASCII hex value of the corresponding character of the key. That is, for the first character of the Input ("S"), the cipher looks at the ASCII code of "P", which is 50hex. Then it finds that number on the table above. As you can see, however, the numbers only range from 00-3F. If the ASCII value of a key character is in excess of 3F, then simply loop. That means that 40hex becomes 00hex; 41 becomes 01hex; 9D becomes 1D. In other words, while the ASCII value is greater than 3F, continue to subract 40hex from it until it comes into range. So, the ASCII value for "P", our first key character, is 50hex, which obviously is greater than 3F. So subract 40hex: 50hex - 40hex = 10hex, which is in the proper range. SO, that means, "P" becomes 10hex (and the key character of "P" will always always always yield 10hex). Now, the character paired with this value (10hex) on the chart above--"q"--will be our STARTING POINT. Now let's take a look at the Input character: "S". Its hex value is 53. Now what the cipher does is take each of the digits of this value, and make them into their own. So 53hex becomes 5hex (DIGIT ONE) and 3hex (DIGIT TWO). As you might have noticed, each character in the input is always rendered as two characters in the output. These two characters are found by starting at the starting point (10hex), and then moving to the right by digit one units to get the first character, and then again from the starting point, moving to the right this time by digit two units, to get the second character. (You will have to loop back to 00hex if you go past 3F.) To recap: Key Character = "P" (50hex) Starting point = conform 50hex to range of 00hex-3F Starting point = 10hex Input Character = "S" (53hex) Digit 1 = 5hex Digit 2 = 3hex Output Character 1 = Starting point + Digit 1 Output Character 1 = 10hex + 5hex = 15hex Output Character 1 = "v" Output Character 2 = Starting point + Digit 2 Output Character 2 = 10hex + 3hex = 13hex Output Character 2 = "t" And then repeat the process for every character of the Input. I'll do the second for you as well: Key Character = "0" (30hex) Starting point = conform 30hex to range of 00hex-3F Starting point = 30hex Input Character = "S" (53hex) Digit 1 = 5hex Digit 2 = 3hex Output Character 1 = Starting point + Digit 1 Output Character 1 = 30hex + 5hex = 35hex Output Character 1 = "1" Output Character 2 = Starting point + Digit 2 Output Character 2 = 30hex + 3hex = 33hex Output Character 2 = "Z" If you have the Output and the Key, and are looking for the Input, it's merely a matter of working backwards. |
![]() |
| Viewing: Dev Shed Forums > System Administration > Security and Cryptography > Crypto Algorithm Question - Encryption and Decryption Method |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|