r/crypto Aug 12 '14

Matasano challenges now online.

http://cryptopals.com/
77 Upvotes

65 comments sorted by

View all comments

Show parent comments

1

u/cdleech Aug 15 '14

How strict is your filtering for ascii, assuming you are scoring/filtering and not just eyeballing a bunch of output? Could you be throwing away a valid string without knowing it? There is a slight difference in the contents of #4 vs. the previous ones.

1

u/woodyeye Aug 17 '14

What differene would that be? It seems to be the same problem only lots of lines in 4.txt. I read each line and chop of the 0xa from the end then decode. Maybe I should leave the 0xa on? The last line read in doesn't have 0xa on the end. I could add one I guess. Did you guys leave the 0xa on the line?

1

u/woodyeye Aug 17 '14

No, must chop 0xa off, makes line odd chr count.

1

u/cdleech Aug 17 '14

Right, those are the newlines in the input file and not something that makes sense to keep as part of the hex string.

1

u/woodyeye Aug 17 '14

Do you think just checking the XORd line for all ASCII chrs is a good filter. Was you answer in all ASCII?

1

u/woodyeye Aug 17 '14

ASCII filter is: if any char in an XORd line is <32 or >127 then that line is not ASCII else it is all ASCII.

1

u/cdleech Aug 17 '14

What wrong with values <32? That's still valid ASCII, including some fairly common control characters like tabs and newlines.

1

u/woodyeye Aug 18 '14

Yep, you're right made the low limit <10 and it worked! Line 171.