Author Topic: Any encryption crackers? <challenge>  (Read 13214 times)

0 Members and 1 Guest are viewing this topic.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Any encryption crackers? <challenge>
« Reply #15 on: August 23, 2004, 04:06:51 PM »
Thank you David.

In the interests of making it a little clearer, I separated the instances (remember there were three strings way back folks) and removed the quotes at either end of the strings from the analysis:

Code: [Select]
;;  Original

117  246  240  119  099  101  232  253  047  124  246  125

087  104  187  238  104  161  242  121  123  183  242  249  249  119  110  229  165

069  098  175  234  251  115  058  111  244  240  123  056  243  252  121  032  228  114  110  227  252  246  112  102  179

;;  Encrypted

116  104  101  115  119  097  109  112  046  111  114  103

073  116  032  105  115  032  116  104  101  032  097  110  115  119  101  114  046

068  111  032  121  111  117  032  107  110  111  119  032  116  104  101  032  113  117  101  115  116  105  111  110  063

;;  Difference

 -1 -142 -139   -4   20   -4 -123 -141   -1  -13 -132  -22

-14   12 -155 -133   11 -129 -126  -17  -22 -151 -145 -139 -134    0   -9 -115 -119

 -1   13 -143 -113 -140    2  -26   -4 -134 -129   -4  -24 -127 -148  -20    0 -115    3   -9 -112 -136 -141   -1    8 -116


And another way to look at it ...

Code: [Select]
;;  String1. Original, Encrypted, Difference

117  246  240  119  099  101  232  253  047  124  246  125

116  104  101  115  119  097  109  112  046  111  114  103

 -1 -142 -139   -4   20   -4 -123 -141   -1  -13 -132  -22

;;  String2. Original, Encrypted, Difference

087  104  187  238  104  161  242  121  123  183  242  249  249  119  110  229  165

073  116  032  105  115  032  116  104  101  032  097  110  115  119  101  114  046

-14   12 -155 -133   11 -129 -126  -17  -22 -151 -145 -139 -134    0   -9 -115 -119

;;  String3. Original, Encrypted, Difference

069  098  175  234  251  115  058  111  244  240  123  056  243  252  121  032  228  114  110  227  252  246  112  102  179

068  111  032  121  111  117  032  107  110  111  119  032  116  104  101  032  113  117  101  115  116  105  111  110  063

 -1   13 -143 -113 -140    2  -26   -4 -134 -129   -4  -24 -127 -148  -20    0 -115    3   -9 -112 -136 -141   -1    8 -116

Good luck folks.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

JohnK

  • Administrator
  • Seagull
  • Posts: 10631
Any encryption crackers? <challenge>
« Reply #16 on: August 23, 2004, 08:16:55 PM »
huh?! thats interisting!? Your obviusly altering either the binary or the ASCII number with a formula a sweet formula.... another neat point is that i dont see that you had a problem where i did in mine. (Over shooting the "bonds" of ACSII code) ...Damn you sir!

OBTW, i think you have your orders screwed up MP.

Quote
;;  String3. Original, Encrypted, Difference

069  098  175  234  251  115  058  111  244  240  123  056  243  252  121  032  228  114  110  227  252  246  112  102  179 ;; Garbage char's

068  111  032  121  111  117  032  107  110  111  119  032  116  104  101  032  113  117  101  115  116  105  111  110  063  ;; <-- "D" "o" "<space>" ...


*edit* I should prolly mention that i didnt verify my last statement, i just looked at the code and translated the numbers and letters i knew off the top of my head. so take what i said with a grain of salt.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Any encryption crackers? <challenge>
« Reply #17 on: August 23, 2004, 10:05:16 PM »
Quote from: Se7en
OBTW, i think you have your orders screwed up MP.

I may -- I had quickly edited what David posted; apologies to you, David and everyone if I FUBARed it in the process.

Here is new data to play with / analyze:

Code: [Select]
(progn

    (defun xor (a b) (boole 6 a b))
   
    (defun fmt (x / s)
        (strcat (if (minusp x) "-" " ")
            (substr (setq s (strcat "00" (itoa (abs x))))
                (- (strlen s) 2)
            )
        )    
    )

    (foreach text

       '(  
            "theswamp.org"
            "Rocks!"
            "Oh yeah!"
        )

        (print text)    
        (print (setq giberish (encode text password)))
        (print (mapcar 'fmt (setq codes1 (vl-string->list text))))
        (print (mapcar 'fmt (setq codes2 (vl-string->list giberish))))
        (print (mapcar 'fmt (mapcar '- codes2 codes1)))
        (print (mapcar 'fmt (mapcar 'xor codes2 codes1)))
        (princ "\n")

    )

    (princ)

)

"theswamp.org"
"uöðwceèý/|ö}"
( 116  104  101  115  119  097  109  112  046  111  114  103) ;; original
( 117  246  240  119  099  101  232  253  047  124  246  125) ;; encoded
( 001  142  139  004 -020  004  123  141  001  013  132  022) ;; difference
( 001  158  149  004  020  004  133  141  001  019  132  026) ;; xor'd

"Rocks!"
"Eõõya¸"
( 082  111  099  107  115  033) ;; original
( 069  245  245  121  097  184) ;; encoded
(-013  134  146  014 -018  151) ;; difference
( 023  154  150  018  018  153) ;; xor'd

"Oh yeah!"
"_o,tâsã¥"
( 079  104  032  121  101  097  104  033) ;; original
( 095  111  044  116  226  115  227  165) ;; encoded
( 016  007  012 -005  125  018  123  132) ;; difference
( 016  007  012  013  135  018  139  132) ;; xor'd

(Used same password as last time).

Have fun! :D
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

David Bethel

  • Swamp Rat
  • Posts: 656
Any encryption crackers? <challenge>
« Reply #18 on: August 24, 2004, 08:46:26 AM »
Just a guess on the structure:

The password generates a key value based on it's ascii value total

"Hello": 72 + 101 + 108 + 108 + 111 = 500


Based on the 1st letter being a plus 1 value, the formula probably starts something like

key = 500
oc 'Original character
ec 'Encrypted character

(setq ec (+ (asciii oc) (fix (some_function key))))

and them some way to force that value to between 32 & 255 that can be reversed.

(if (> decrypt_oc 255)
    (- or rem or something

-David

Michael,  it looks like the font used in the code section for the forum is not a true monspaced font.  Maybe it is just me....
R12 Dos - A2K

JohnK

  • Administrator
  • Seagull
  • Posts: 10631
Any encryption crackers? <challenge>
« Reply #19 on: August 24, 2004, 09:30:02 AM »
Well i started to think that he just fliped a bit in the origional ascii value, but then i got an "idea" from David's post where he used the password to generate a mathmatical key of somesort. I think i see what hes doing now.

Here are these values binary:
Code: [Select]

( 079  104  032  121  101  097  104  033) ;; original
( 095  111  044  116  226  115  227  165) ;; encoded
        79  01001111
        95  01011111
       
        32  00100000
        44  00101100
       
        121 01111001
        116 01110100
       
        101 01100101
        226 11100010
       
        97  01100001
        115 01110011
       
        104 01101000
        227 11100011
       
        33  00100001
        165 10100101


Here is the password in binary:
Code: [Select]

"Hello": 72 + 101 + 108 + 108 + 111

        72  01001000
        101 01100101
        108 01101100
        111 01101111


Now this wont work but it will help you visualise what im trying to say. Hes taking a letter of the password and applying a logical OR to a letter of the string. As it finsihes it moves the the next char in each. Once the password is used up, it itterates thru again.

...?!?!?!
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

Ron Heigh

  • Guest
Any encryption crackers? <challenge>
« Reply #20 on: August 24, 2004, 09:32:51 AM »
Thats the standard way to do a XOR encryption.
He said he added something new to change it so it isn't so easy to decrypt.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Any encryption crackers? <challenge>
« Reply #21 on: August 24, 2004, 09:47:19 AM »
Hey guys -- great participation. :)

David get's some points here:
Quote from: David
The password generates a key value ...

Let's call this a hash value.

Quote from: David
... based on it's ascii value total ...

and then promptly loses points.

Quote from: Se7en
Hes taking a letter of the password and applying a logical OR to a letter of the string.

Nope.

Quote from: Se7en
As it finsihes it moves the the next char in each. Once the password is used up, it itterates thru again.

Nope.

Quote from: Ron Heigh
He said he added something new to change it so it isn't so easy to decrypt.

Yep, that was in my design guidelines. Later on I will post some of them.

Thanks guys! :)
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

David Bethel

  • Swamp Rat
  • Posts: 656
Any encryption crackers? <challenge>
« Reply #22 on: August 24, 2004, 10:10:22 AM »
>> ... based on it's ascii value total ... <<

or some such formula.

A hash value can usually be duplicated using different passwords.  I would think that lots of combinations of letters and numbers can produce the same results given a simple equation.  The more complex the equation, the more secure the password.

But all in all it produces a number.  -David
R12 Dos - A2K

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Any encryption crackers? <challenge>
« Reply #23 on: August 24, 2004, 10:26:14 AM »
Quote from: David
The more complex the equation, the more secure the password. But all in all it produces a number.

No refuting that.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Any encryption crackers? <challenge>
« Reply #24 on: August 24, 2004, 11:36:11 AM »
this is an interesting prospect....where the following will be required to be done... not impossible but not the easiest task in the world either....

determine password hash
determine algorithm

Based on the given data there would have to be lots of testing and retesting before a viable solution would be found.
If however, there were more encrypted data strings to review it would make the task a bit simpler, at least I think it would.
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Any encryption crackers? <challenge>
« Reply #25 on: August 24, 2004, 11:59:07 AM »
Quote from: Keith
If however, there were more encrypted data strings to review it would make the task a bit simpler, at least I think it would.

As you wish buttercup ...

Code: [Select]
(defun test_strings ( list_of_strings / xor fmt prt str2 lst1 lst2 )

    ;;  note, for this exercise PWD is
    ;;  a global defined outside this
    ;;  program [lest I give all the
    ;;  secrets away prematurely].

    (defun xor (a b) (boole 6 a b))
   
    (defun fmt (x / s)
        (strcat (if (minusp x) "-" " ")
            (substr (setq s (strcat "00" (itoa (abs x))))
                (- (strlen s) 2)
            )
        )    
    )
   
    (defun prt ( lst )
        (princ (mapcar 'fmt lst))
        (princ "\n")
    )

    (foreach str1 list_of_strings

        (print str1)    
        (print (setq str2 (encode str1 PWD)))
        (princ "\n")
        (prt (setq lst1 (vl-string->list str1)))
        (prt (setq lst2 (vl-string->list str2)))
        (prt (mapcar '- lst2 lst1))
        (prt (mapcar 'xor lst2 lst1))
        (princ "\n")

    )

    (princ)

)

(test_strings
   '(
        "a"
        "ab"
        "abc"
        "abcd"
        "abcde"
    )
)    

"a"
"x"
( 097) ;; original
( 120) ;; encoded
( 023) ;; difference
( 025) ;; xor'd

"ab"
"gà"
( 097  098) ;; original
( 103  224) ;; encoded
( 006  126) ;; difference
( 006  130) ;; xor'd

"abc"
"sêå"
( 097  098  099) ;; original
( 115  234  229) ;; encoded
( 018  136  130) ;; difference
( 018  136  134) ;; xor'd

"abcd"
"ambò"
( 097  098  099  100) ;; original
( 097  109  098  242) ;; encoded
( 000  011 -001  142) ;; difference
( 000  015  001  150) ;; xor'd

"abcde"
"jöxàs"
( 097  098  099  100  101) ;; original
( 106  246  120  224  115) ;; encoded
( 009  148  021  124  014) ;; difference
( 011  148  027  132  022) ;; xor'd

I chose these strings because the output is VERY revealing, and indeed reveals one of my key design requirements if you can see it.

:)
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

JohnK

  • Administrator
  • Seagull
  • Posts: 10631
Any encryption crackers? <challenge>
« Reply #26 on: August 24, 2004, 12:02:47 PM »
.....WHAT?! *How you do that?!*

the letter "A" isnt the same encoded in your tests! Oh, Your killing me!
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Any encryption crackers? <challenge>
« Reply #27 on: August 24, 2004, 12:11:23 PM »
Excellent observation Se7en, that was one of my design requirements (makes it more difficult to crack the algorithm).

Notice anything in the following (subtle but important)?

Code: [Select]
(foreach x

   '(  
        "I chose these strings because the output is VERY revealing, "
        "and indeed reveals key design requirements if you can see it."
    )
   
    (print (encode x password))
   
    (princ)
   
)    

"F!pççkù;þèqóå´jêpqøûùµ|laà|n÷7mÿp:xêðåáq)ts?[HÏV(ôvorysæîô¶¨"
"zèj¼mkçsoå6ÿ}øræî÷¼xàý'áçiõ|è5|~tûøà|älûñ|¸jñ¯jpô¦møp³zbö âw¤"
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

JohnK

  • Administrator
  • Seagull
  • Posts: 10631
Any encryption crackers? <challenge>
« Reply #28 on: August 24, 2004, 12:20:38 PM »
the only thing i notice right away is the capital letters; They seem to be retained in the excrypted version. (I dont know it its important or not, but ill have to look this over to see if i see anything else.)
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Any encryption crackers? <challenge>
« Reply #29 on: August 24, 2004, 12:33:27 PM »
Well done Se7en, though not entirely correct.

Code: [Select]
(foreach x

   '(   "I Chose These Strings Because The Output Is Very Revealing, "
        "And Indeed Reveals Key Design Requirements If You Can See It."
    )
   
    (print (encode x password))
   
    (princ)
   
)    

"F!Pççkù;Þèqóå´JêpqøûùµBlaà|n÷7Mÿp:Xêðåáq)Ts?[hïv(Ôvorysæîô¶¨"
"Zèj¼Mkçsoå6ß}øræî÷¼Xàý'Áçiõ|è5R~tûøà|älûñ|¸Jñ¯Jpô¦Møp³Zbö Âw¤"

;; Putting them back to back with the original strings --

"I Chose These Strings Because The Output Is Very Revealing, "
"F!Pççkù;Þèqóå´JêpqøûùµBlaà|n÷7Mÿp:Xêðåáq)Ts?[hïv(Ôvorysæîô¶¨"

"And Indeed Reveals Key Design Requirements If You Can See It."
"Zèj¼Mkçsoå6ß}øræî÷¼Xàý'Áçiõ|è5R~tûøà|älûñ|¸Jñ¯Jpô¦Møp³Zbö Âw¤"

David's correct, the code font does not appear to be a non proprtional one, though I'm doing nothing other than using the code tags. Hmmm.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst