dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 1 of 2 12 LastLast
Results 1 to 15 of 24

Thread: String Encoding - *JeffB*

  1. #1
    Join Date
    Jul 2002
    Location
    England
    Posts
    163

    String Encoding - *JeffB*

    This is a second little encoding scheme ive devised. Once again, can anyone break this.

    <#lg96yF>|{`@`"
    y Y7
    -
    +U-[{4'mE#@~\Ww5Uu^+h]}6TP~E29"d<_*.8
    -
    v1}YfpLeY#C'G
    pY1Q'G$-M*nG%v>

    The string is as long as it was to start with. It is encapsulated by < and > and does not require a key to break. All you need is the above string. A solved example is below:

    <:gE;f<h^8b_& >

    <:Testing testing, attention please!>

    This one goes out to JeffB, the smart alec who broke the last one.
    Finite

    "If a cat always lands on its feet, and a peice of bread always lands butter side down, if you strap a peice of bread butter side up to the back of a cat, will it hover?"

  2. #2
    Join Date
    Jun 2002
    Location
    Lyman ME - USA | Oneonta NY - USA
    Posts
    399
    i don't have the time today to check it out, sorry finite...i ran a few test loops through just the plain ascii setup, not knowing what jeff put out cuz i didn't get to see it(too busy working) and i couldn't recognize any patterns, The first few letters had something going but other than that i didn't see anything worth looking into....gj



    ttyl

    - nc
    "In a world without walls and barriers, what need is there for windows and gates!" - a mac ad
    "What was the best thing before sliced bread and when did sliced bread go out of existence?" - me
    "Software is like sex, it's better when it's free." - Linus Torvalds <- gotten from Andreas Masur


    Live Penguine! - Tux the linux mascot
    Vivez le penguine!, Viva en penguine!, Lang lebe der Pinguin!, Viva no penguine!, Viva sul penguine!

  3. #3
    Join Date
    Jul 2000
    Location
    Milano, Italy
    Posts
    7,726

    Wink Quite near, is not it?

    TRanslation:
    If this is JeffB, I hate you. ;-) Lol.
    Ta ior4`esting#iv!again; Send FiniteInfinity a PM with the subject as Seqeence213.
    And how you figure#ait out as#whll. Lol
    I really need to get dftter at this, any suggestions?
    ...at present time, using mainly Net 4.0, Vs 2010



    Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
    all the other wonderful people who made and make Codeguru a great place.
    Come back soon, you Gurus.

  4. #4
    Join Date
    Sep 2001
    Location
    Qubec, Canada
    Posts
    1,923

    Re: Quite near, is not it?

    Originally posted by Cimperiali
    TRanslation:
    If this is JeffB, I hate you. ;-) Lol.
    Ta ior4`esting#iv!again; Send FiniteInfinity a PM with the subject as Seqeence213.
    And how you figure#ait out as#whll. Lol
    I really need to get dftter at this, any suggestions?
    I have more trouble decrypting your thought Cimperiali than the Encrypted string of FiniteInfinity ,

    and why do u know for the PM?

    JeffB - just for the second pattern, trying to find the right substraction...

  5. #5
    Join Date
    Jun 2002
    Location
    Lyman ME - USA | Oneonta NY - USA
    Posts
    399
    rofl thats pretty funny..how'd you figure it out Cimperialli? Guide me!

    thanks

    - nc
    "In a world without walls and barriers, what need is there for windows and gates!" - a mac ad
    "What was the best thing before sliced bread and when did sliced bread go out of existence?" - me
    "Software is like sex, it's better when it's free." - Linus Torvalds <- gotten from Andreas Masur


    Live Penguine! - Tux the linux mascot
    Vivez le penguine!, Viva en penguine!, Lang lebe der Pinguin!, Viva no penguine!, Viva sul penguine!

  6. #6
    Join Date
    Jul 2000
    Location
    Milano, Italy
    Posts
    7,726

    To booogt

    I simply translated (not completely...) the message posted by finiteInfinity in crypted style...the following one:

    <#lg96yF>|{`@`"
    y Y7
    -
    +U- [{4'mE#@~\Ww5Uu^+h]}6
    TP~E29"d<_*.8
    -
    v1}YfpLeY#C'G
    pY1Q'G$-M*nG%v
    ...at present time, using mainly Net 4.0, Vs 2010



    Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
    all the other wonderful people who made and make Codeguru a great place.
    Come back soon, you Gurus.

  7. #7
    Join Date
    Jun 2002
    Location
    Lyman ME - USA | Oneonta NY - USA
    Posts
    399
    thats nice cimperiali, i just checked my PM's

    thats what i was working on yesterday but i was using Int's not longsand i didn't check for anything < 0 which i should have...then i prolly would have had it...

    thanks

    - nc
    Last edited by booogt; August 9th, 2002 at 11:21 AM.
    "In a world without walls and barriers, what need is there for windows and gates!" - a mac ad
    "What was the best thing before sliced bread and when did sliced bread go out of existence?" - me
    "Software is like sex, it's better when it's free." - Linus Torvalds <- gotten from Andreas Masur


    Live Penguine! - Tux the linux mascot
    Vivez le penguine!, Viva en penguine!, Lang lebe der Pinguin!, Viva no penguine!, Viva sul penguine!

  8. #8
    Join Date
    Sep 2001
    Location
    Qubec, Canada
    Posts
    1,923
    I think you'll hate me FinitiInfinity, just got that substraction, now, it will be the end... let me the time to put that in VB code

    (Good encryption, better than yesterday ! )

    JeffB

  9. #9
    Join Date
    Jul 2002
    Location
    England
    Posts
    163
    Ok ok, I dont hate you Jeff, im jsut starting to dislike you! Lol
    Good one Cimperiali, thats a nice try, not complete, but good never the less.
    Lets face it, for my first two attempts this are pretty poor. Some guy also PM'd me with the completely decoded answer.
    Can anyone point me in the right direction to making something a little more difficult to decode?
    Im looking at maths but i still havnt got anything I can Encode, AND decode. Lol
    Finite

    "If a cat always lands on its feet, and a peice of bread always lands butter side down, if you strap a peice of bread butter side up to the back of a cat, will it hover?"

  10. #10
    Join Date
    Sep 2001
    Location
    Qubec, Canada
    Posts
    1,923
    Since Cimperiali post the answer, I'll post mine.

    It seems I get the same things as Cimperiali, the first sentence is clearly lisible, but the rest lack, I think there is a Return character or something that did not post here correct, anyway, here the answers I got (trying to figure what the missing character is)

    Code:
    #If this is JeffB, I hate you. ;-) Lol.
    Ta r4`estiniagain; Send FiniteInfinity a PM with the subject as Sequence213.
    And how you figure#ait out awl. Lol
    I really need to get tter am this, any suggestions?
    
    #If this is JeffB, I hate you. ;-) Lol.
     r4`estiniagain; Send FiniteInfinity a PM with the subject as Sequence213.
    And how you figure#ait out awl. Lol
    I really need to get tter am this, any suggestions?
    
    #If this is JeffB, I hate you. ;-) Lol.
    Ta Vr4`estiniagains; Send FiniteInfinity a PM with the subject as Sequence213.
    And how you figure#ait out awRl. Lol
    I really need to get Htter am this, any suggestions?
    JeffB - #If this is JeffB, I hate you. ;-) Lol.

  11. #11
    Join Date
    Jun 2001
    Location
    MO, USA
    Posts
    2,868
    Take a "crack" at this code:

    2123337 7696249 6645536 7610484 7563624 7237408 7938149 2127215 7758184 7610469 2125679 6518125 7610472 6647145 7237408 7305504 2126453 7233896 2913124 7692832 4792436 7105575 7692832 7938169 2127215 6430817 7497061 6647328 2126968 7170420 4792421 6648608 7938149 2192751 2105377

  12. #12
    Join Date
    Jul 2002
    Location
    England
    Posts
    163

    Lightbulb

    After thinking about it, I think that both CImperiali and you Jeff actually decoded it wrong. Heres the section of VB code to do it:
    Code:
    Public Function CascadeDecode(strInput As String)
        Dim lngLen          As Long
        Dim lngCount        As Long
        Dim intCascade      As Integer
        Dim intChunk        As Integer
        Dim strChunk        As String
        Dim strOutput       As String
        
        lngLen = Len(strInput)
        strChunk = Left(strInput, 1)
        intCascade = Asc(strChunk)
        strOutput = Chr(intCascade)
        
        For lngCount = 2 To lngLen
            strChunk = Mid(strInput, lngCount, 1)
            intChunk = Asc(strChunk) - intCascade
            If intChunk < 0 Then
                intChunk = intChunk + 255
            End If
            intCascade = intCascade + intChunk
            intCascade = intCascade Mod 255
            strOutput = strOutput & Chr(intChunk)
        Next lngCount
        
        CascadeDecode = strOutput
    End Function
    How did you think the message was encoded? I know about the 1st character thing, I was in a bit of a rush!
    Last edited by Cimperiali; March 16th, 2005 at 03:32 PM.
    Finite

    "If a cat always lands on its feet, and a peice of bread always lands butter side down, if you strap a peice of bread butter side up to the back of a cat, will it hover?"

  13. #13
    Join Date
    Sep 2001
    Location
    Qubec, Canada
    Posts
    1,923
    Hello Finite!, how is going!

    Actually, if I use your function, I get:

    Code:
    #If this is JeffB, I hate you. ;-) Lol.
    Ta \yr4`estiniagain; Send FiniteInfinity a PM with the subject as Sequence213.
    And how you figure#ait out awl. Lol
    I really need to get tter am this, any suggestions?
    These is a Car Code that has been misplaced or translate to something else. I see return line, but they don't seem to help translation, so, I guess Cimperiali and me has decoded correctly your encryption scheme

    Well, the encoded was not that hard to decrypt, but it fools me because the Mod thing just got random, and it takes me more time to understand, but I actually found at start how "the characters who don't need Mod" were encoded. I see that the characters that was causing me trouble were all lesser than the correct character

    for your example:

    GOOD ANSWER --->>58 84 101 115 116
    CRYPTED --->>58 142 243 103 219

    It is obvious that the first character were non-changed, and that the 103 was lesser that the 155, so I start searching a way to obtains 103 with some characters substraction, and I have finally found : 243 + 115 - 255 = 103, but all of the others characters were easily found, and I think that Cimperiali found it pretty quickly (he's surely more experienced than me).

    Your last encryption was a regular pattern without if ( if > 255), so it was relatively easy, a pattern was easily discernable (AAB), but that one was exactly:
    (ABBABABABBABBABABBB ABABABBABBABABBA)
    Do you see a pattern in that?? I should have detected at first that there was an IF or anything else that prevented regularity, but I thought you were having a 19 characters pattern...

    I will not be stop next time by MOD or whatever you call that in english.

    Ok, did not find anything about your encrypted things DSJ, is that some kind of "that code was publiced in 1952 by a scientist that dies just before telling how to solve it, till that time, no one has ever ever resolve it?" , it is a strong encrytption, you are using 24 bits with each number, these can represent 1 character or as many as 3...,

    JeffB - hope to help you improve your encryption scheme Finite!

  14. #14
    Join Date
    Dec 2001
    Posts
    6,332

    To all you code breakers...

    I don't know if you all missed my encryption scheme, but since you seem to be in the mood for decoding, I thought I'd put it up. It is for registering an app, where each system gets a unique code. The app would present a registration code to the user, and ask for the serial number.

    Here are some registration codes followed by the required serial numbers. This was done simulating the same app being installed on different systems.

    801627-129582-062288 = G68987819-883B7ED6A-20E814A6G

    230761-204054-445286 = A1530FD47-312C34D49-838947A6E

    160197-520323-194241 = 987609A7G-C4720B515-48AD36635

    536240-947369-851293 = D48948634-H7DB5A94F-H6D683B7C


    See if you can decode the serial back to the registration code. If you are really good (like the best ever), you may even figure out what the name of the app is, but I don't believe anybody can do that, because it's used to get the registration code only, and even I can't decript that!

  15. #15
    Join Date
    Jul 2000
    Location
    Milano, Italy
    Posts
    7,726

    To ensure it....

    ..I am not an encrypt /decrypt expert, but I would do something like the following:
    1) encode the string like you do now.
    2)swap bytes (the first and second, the third and fourth,...) and encode it again
    3)take first third of string, put it at end of string, encode string again.
    4)reverse the string. Code it again.

    This should increase difficoulty in decoding it...
    ...at present time, using mainly Net 4.0, Vs 2010



    Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
    all the other wonderful people who made and make Codeguru a great place.
    Come back soon, you Gurus.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)