2nd time Encryption after decryption fails

Hi, I am testing the function of Nextcloud, and it seems an issue of encryption.

Issue :
2nd time Encryption does not work properly.

  • Real files on the server will not be encrypted.
  • Files throuth the NextCloud interface can not read.

How to reproduce :

  1. Set Data folder separated locatoin. (where it is not a root of web)
  2. Encrypt all the files on the sever
  3. Decrypt all the files on the server
  4. Encrypt all the files on the server again

I guess this caused by the old secret keys that are remains on the server.
When the files are decpryted, old secret keys have to be deleted as well.

Would you take a look at that?

Additional information :
I have tried to decryption after 2nd encryption. But it does not work well. I could not read anything from Nextcloud front-end, after 2nd encryption.
All encrypted information has been corrupted and cannot be recovered.

At this moment, I do not recommend to use Encryption feature, if you plan to migrate server in the future.