Merge pull request #3613 from AndrzejKurek/fi-double-crypto-calls

Add double pk verification and double master secret calculation