Implementing secure messaging in blockchain networks