Asymmetric encryption of smart contracts

Is there any way we can implement asymmetric encryption?

To illustrate the purpose more easily, let me give you a simple example.

There is A purchase list in the smart contract, and after user A purchases it can get the content, which comes from an IPFS address or a web address.

If the smart contract returns the address directly, then the owner can know that address without authorization (no purchase required).

How should we let only A can get the data correctly, while other users can not read it properly?

I expect it to be implemented using smart contracts alone, without the need for additional servers.

(The following is in Chinese, you do not need to pay attention to it, its content is the same as English.)

我们是否有什么方法实现非对称加密?
为了更简单描述用途,我举例一个简单例子。
智能合约中有一个购买清单,用户A购买后它可以获取内容,该内容来自一个IPFS地址好或一个网址。
我们应该如何只让A能够正确获取数据,而其它用户无法正常读取。
如果智能合约直接返回地址,那么所有人可以不授权(不需要购买)知道该地址。
我期待它仅利用智能合约实现,而不需要额外的服务器。

Hmm could it be maybe be done with Zero-Knowledge Proofs? I believe it should be possible to implement on the æternity protocol already, check this video:

Well, I don’t want to be too challenging. I don’t think I can do it. lol…

Please let us know if you have any specific technical questions in this regard, surely someone will be able to help you here :slight_smile: