I have an c/c++ program used for encrypting data for communicating between two ends. Encryption is done using OpenSSL (0.9.8d-fips, Sep 2006). Think it'll be worthy to mention that I'm not much familiar with using OpenSSL.

The program works fine for larger packets. But the size overhead is very high when encrypting smaller size packets. I've done a test to demonstrate the issue.

```
+-------------+-----------------+-------------------+
| Input Chars | Encrypted Chars | Input/Encrypted % |
+-------------+-----------------+-------------------+
|           1 |              74 | 1.351351351       |
|           2 |              74 | 2.702702703       |
|           3 |              74 | 4.054054054       |
|           4 |              74 | 5.405405405       |
|           5 |              74 | 6.756756757       |
|           6 |              74 | 8.108108108       |
|           7 |              74 | 9.459459459       |
|           8 |              74 | 10.81081081       |
|           9 |              74 | 12.16216216       |
|          10 |              74 | 13.51351351       |
|          11 |              74 | 14.86486486       |
|          12 |              90 | 13.33333333       |
|          13 |              90 | 14.44444444       |
|          14 |              90 | 15.55555556       |
|          15 |              90 | 16.66666667       |
+-------------+-----------------+-------------------+

```

The test was done while incrementing the number of input characters from 1 to 10000 . Following graphs illustrate the results more clearly.

**Graph 1: Encrypted size vs Input Size**
![enter image description here](https://i.stack.imgur.com/rc24o.png)

**Graph 2: Ratio vs Input size**
![enter image description here](https://i.stack.imgur.com/gixEA.png)

From the second graph, it's clearly visible that the encryption overhead is very high for smaller inputs (size less than 300bytes).

Is this normal/acceptable? If it is so are there any alternatives (with less overhead). Because the application uses smaller packets heavily (Bundling them together is not an option).

As mentioned above, OpenSSL 0.9.8d is used, which is a bit older version (1.0.1g, April 2014, is available now). Will the problem be fixed if I upgrade it?