This discussion is archived
6 Replies Latest reply: Jul 9, 2009 10:33 PM by 796440

# How to get the algorithm?

Currently Being Moderated
Hi to all.. i have a set of strings with their corresponding encrypted strings. My question is how to get the algorithm used to encrypt those strings. The values are:
``````String                                       Encrypted value

06/01/2009                              312;.32)54!12833>45
06/02/2009                              312;.32)57!12833>45
06/03/2009                              312;.32)56!12833>45
06/04/2009                              312;.32)51!12833>45
06/05/2009                              312;.32)50!12833>45

07/01/2009                              312;.33)54!12833>45
07/02/2009                              312;.33)57!12833>45
07/03/2009                              312;.33)56!12833>45
07/04/2009                              312;.33)51!12833>45
07/05/2009                              312;.33)50!12833>45``````
• ###### 1. Re: How to get the algorithm?
Currently Being Moderated
That's not encryption as currently understood. It might be a Caesar shift cipher, or just some encoding.
• ###### 2. Re: How to get the algorithm?
Currently Being Moderated
is there a way to get the cipher code?
• ###### 3. Re: How to get the algorithm?
Currently Being Moderated
This is a cryptology question, not a Java question.
• ###### 4. Re: How to get the algorithm?
Currently Being Moderated
All you can do is get as many examples as possible and try to see what's happening.
A first guess might be that:

31 represents the initial 0 of the month, 2;. is padding, that 32 to 33 would represent 6 to 7 in the units position of the month, and possibly that 26+x would represent x;
5 represents 0 in the units position of the day
4 represents 1 in the day, 7 represents 2, 6 represents 3, 1 represents 4 and 0 represents 5.
We could maybe further guess that if 4 represents 1 then 1 represents 4 as that fits with 5 representing 0.

Finally,
we could not do much about the years without seeing more examples from other years.

My first gues would then be that

12/25/2009 would be represented as 322;.28)70!12833>45

BUT WITHOUT A LOT MORE EXAMPLES IT'S IMPOSSIBLE TO TELL
• ###### 5. Re: How to get the algorithm?
Currently Being Moderated
Thanks for the reply. I will try to gtet more examples.
• ###### 6. Re: How to get the algorithm?
Currently Being Moderated
Jepot wrote:
Thanks for the reply. I will try to gtet more examples.
It's still not a Java question, so why post it here?