Almost conform to the ircrypt protocol

only decryption of private message is not working.

Signed-off-by: Sven Haardiek <Sven@Haardiek.de>