wu :: forums (http://www.ocf.berkeley.edu/~wwu/cgi-bin/yabb/YaBB.cgi)
riddles >> cs >> Breaking o t p
(Message started by: R0B1N on Mar 21st, 2012, 4:43am)

Title: Breaking o t p
Post by R0B1N on Mar 21st, 2012, 4:43am
Hi

I do have 11 strings  XOR encrypted with same key.
Why i can break them ? at least one of them. appreciate any input

Logic:
For each of the possible string i and j find mssg_i xor mssg_j store in xors

go a grid look up to identify possible candidates for space

I'm damn new to python and below is the work so far. (uses a ^ ' ' = A , B ^ ' ' =
b etc ) (Sorry just couldnt get them indented properly)

Code:
for i in range(11):
 xors.append([])
 for j in range(11):
    msg_i_xor_msg_j =   strxor(msgs[i].decode('hex'),msgs[j].decode('hex'))
    xors[i].append(msg_i_xor_msg_j)



Code:
for i in range(11):
 print "==="
   for j in range(11):
   #for msg in xors:
     out = ""
     for char in xors[i][j]:
      #if ord(char) >=32 and 126>=ord(char):
      if (ord(char) >=65 and 90>=ord(char)) or (ord(char)>=97 and 122>= ord(char)):
        out += char
      else:
        out += "_"
      print out

Title: Re: Breaking o t p
Post by Grimbal on Mar 21st, 2012, 5:35am
Suppose
msg[i] are the crypted messages you have,
key is the key,
clear[i] are the clear messages:  msg[i] = clear[i] xor key.

Then (msg[i] xor msg[j]) = (clear[i] xor clear[j]).  You get rid of the key, but it is still the xor of 2 words.  It gives nothing readable.


Title: Re: Breaking o t p
Post by R0B1N on Mar 22nd, 2012, 11:30am
Here is what i am doing

=> I am assuming all 11 msg[i]'s are [a-zA-Z] or ' '(space)

=> observation 'A' XOR ' ' = 'a'  and    'a' XOR ' ' = 'A'

=>if msg[1] XOR msg[2] is a character at position k then either msg[1] or msg[2] has a space at position k
if all or most of msg[1] ^ msg[j] has space at position k then it is safe enough to conclude msg[1] has space at position k .
[hide]Find all spaces to get key[/hide]
http://en.wikipedia.org/wiki/Venona_project

Title: Re: Breaking o t p
Post by SMQ on Mar 28th, 2012, 5:17am

on 03/21/12 at 04:43:56, R0B1N wrote:
Hi
I do have 11 strings  XOR encrypted with same key.
Why i can break them ? at least one of them. appreciate any input

Posting assignments from Stanford's online cryptography class, are we? ;-)  I'd suggest the class discussion forums are a more appropriate venue...

--SMQ

Title: Re: Breaking o t p
Post by R0B1N on May 1st, 2012, 4:41am

on 03/28/12 at 05:17:57, SMQ wrote:
Posting assignments from Stanford's online cryptography class, are we? ;-)  I'd suggest the class discussion forums are a more appropriate venue...

--SMQ

Yes It is from coursera.
It was hard to discuss anything in the coursera forum without spoiling the fun for others
I didn't want search engines to find it out before the deadline .  Hence did not mention it  :-[

Title: Re: Breaking o t p
Post by Barukh on May 7th, 2012, 10:18pm

on 03/28/12 at 05:17:57, SMQ wrote:
Posting assignments from Stanford's online cryptography class, are we? ;-)  


I am attending this class, and find it very interesting. The lecturer is excellent, albeit problems are a bit too easy, in my opinion.

Anybody else enrolled? Impression?



Powered by YaBB 1 Gold - SP 1.4!
Forum software copyright © 2000-2004 Yet another Bulletin Board