PHP + OpenSSL - Signature checking randomly fails

Discussions of secure PHP coding. Security in software is important, so don't be afraid to ask. And when answering: be anal. Nitpick. No security vulnerability is too small.

Moderator: General Moderators

Post Reply
messier79
Forum Newbie
Posts: 4
Joined: Sun Oct 31, 2010 1:49 pm

PHP + OpenSSL - Signature checking randomly fails

Post by messier79 »

Hi
I experience a weird problem. I encrypt a file usin PHP OPenSSL and Rijndael-128. I split the file and encrypt it, calculating a signature for each block.
When I want to decrypt, it seems to work (I can decrypt and verify several blocks), but, randomly, the signature checking rerurn 0. Nothing changes betwwen the successful decryption and the failure. The key is correct and the same than before.
The only idea I have now is that, I perform a lot of decryptions in a short time (several dozens, hundreds), so, maybe, it could make it fail.
If I check the content of openssl_error_string, I can see :
error:0906D06C:PEM routines:PEM_read_bio:no start line


But this error happens everytime (even when it works), so, I dont think it's related.

Any idea ?
Thanks
Post Reply