0

Trying to decrypt with Metamask a digital content previously encrypted with Metamask itself, the extension hangs up when the size of the encrypted file exceeds approximately 200Kb.

I found no evidence of this limitation, which happens in both Chrome and Firefox, in the official Metamask documentation.

If this is a bug, which I believe is also responsible for the behavior highlighted in this question, how can this be solved or by-passed since the encryption phase works like a charm with any size of the file to be encrypted.

blockmined
  • 113
  • 4

1 Answers1

2

It's not a great idea to use ECIES Encryption via Metamask for larger files as it might result in poor and unreliable performance. A better idea would be to encrypt the file with asymmetric encryption like AES256 and encrypt the AES256 encryption key via ECIES in metamask. To decrypt, you first decrypt the encrypted key and use that to decrypt the file.

pbsh
  • 2,441
  • 1
  • 6
  • 24
  • You're right, it's not really a great idea and it's almost certainly not a Metamask bug but a matter of time to wait due to the asymmetric decryption. I will certainly follow your suggestion. – blockmined Feb 02 '22 at 21:15