mchlnix / PyMix

A mix chain implementation in Python using UDP
0 stars 0 forks source link

Channel Init sent after first actual data message #11

Closed mchlnix closed 6 years ago

mchlnix commented 6 years ago

If there are not a lot of clients it can happen, that a channel init message and a data message following it could be placed into the same batch and sent out in the reverse order. That makes the channel init parsing crash.

One way to fix this would be to expect this parsing error and just drop the message being responsible. That could lead to timing attacks, though.

mchlnix commented 6 years ago

In the same vein, the ExitPoint gets plain text with no special markers and has the same problem.

mchlnix commented 6 years ago

When a channel id was not yet seen, the message is decrypted asymmetrically. If that fails, the message gets dropped.