some stuff for metadata decryption and exchange