Fix problems in cryptographic module

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