paragonie / ciphersweet

Fast, searchable field-level encryption for PHP projects
https://ciphersweet.paragonie.com
Other
439 stars 32 forks source link

Backend issue after update #97

Closed DavidPetrasek closed 1 year ago

DavidPetrasek commented 1 year ago

Values stored in my database begin with nacl: I was using this configuration, which was working fine: $engine = new CipherSweet($provider);

But after updating from version 2.0.3 to the latest 4.5.1 it complains about "Invalid ciphertext header." now. I found that this MAGIC_HEADER belongs to ModernCrypto, but manual says the default is BoringCrypto.

So now I have to specify the backend for it to work: $engine = new CipherSweet($provider, new ModernCrypto());

Will it work if I change nacl: to brng: in my database, so I can continue to use the BoringCrypto again? From what I learned is that BoringCrypto is better.

DavidPetrasek commented 1 year ago

Will it work if I change nacl: to brng: in my database, so I can continue to use the BoringCrypto again?

Apparently not, so I have to recipher everything.