Page 1 of 1

PHP + OpenSSL - Signature checking randomly fails

Posted: Thu Feb 24, 2011 5:17 pm
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