Unless there's support for asymmetric encryption, this will not work as symmetric encryption would still require transfer of that key again. A quick search on Etherium's smart contract (solidity) results in it asymmetric encryption of smart contract data being impossible[1][2] there.