On my PHP5 build, the limit is 117 characters (936 bits, strange number). That’s because public key encryption is CPU intensive, and meant to be used on short values. The idea is to use this function to encrypt a secret key that is in turn used to encrypt data using a more efficient algorithm, such as RC4 or TripleDES.openssl_public_encrypt