Add random number to protocol to avoid MIM attack

Signed-off-by: Krzysztof Opasiak <ups100@tlen.pl>