9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] crypto question
@ 2005-04-12 22:54 Tim Newsham
  2005-04-12 23:10 ` boyd, rounin
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Tim Newsham @ 2005-04-12 22:54 UTC (permalink / raw)
  To: 9fans

Hi,
   I noticed that the libc function encrypt() uses some non-standard form 
of cipher chaining.  In the normal case one byte from the previous block 
is reencrypted with 7 bytes from the new block. Additionally there is no 
initialization vector used.

This chaining is not very strong (only slightly better than using ECB 
mode).  In particular:

   - common prefixes will encrypt the same way.
   - large common sequences within the middle or end of the
     data have a reasonable chance of encrypting the same
     way (2^-8 chance of rejoining at each encryption boundary).

These weaknesses could open the way for attacks on the code where 
encrypt() is used.  I was looking over the p9sk1 authentication and didn't 
notice any obvious attacks, but I'm not particularly good at cryptography 
(the fact that the challenge has to be matched in tickets encrypted by two 
different keys offers some protection against splicing).

Is there any reason this scheme was chosen over more traditional chaining 
modes?

Tim Newsham
http://www.lava.net/~newsham/


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2005-04-13 22:16 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-12 22:54 [9fans] crypto question Tim Newsham
2005-04-12 23:10 ` boyd, rounin
2005-04-13  0:18 ` Martin Harriss
2005-04-13  3:36   ` Tim Newsham
2005-04-13  3:44     ` boyd, rounin
2005-04-13 15:52       ` Bruce Ellis
2005-04-13 18:45         ` Tim Newsham
2005-04-13 19:23 ` Devon H. O'Dell 
2005-04-13 22:01   ` Karl Magdsick
2005-04-13 22:05     ` Devon H. O'Dell 
2005-04-13 22:16       ` Bruce Ellis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).