confusednerd
confusednerd

Reputation: 164

SSL Buffer sizes after encryption

We're using TLS v1.2 in our product. My fellow team mate hsa written some code which works with an assumption that during SSL encryption (EncryptMessage), the message size will either remain of the same size, or be smaller than the original text.

Is that assumption right ?

I know from our testing that plain text message size is not equal to the encrypted ciphers length. We have seen the former to be larger, but can it be smaller too ?

Upvotes: 0

Views: 776

Answers (2)

Steffen Ullrich
Steffen Ullrich

Reputation: 123260

The encrypted message can be smaller if TLS compression is used. But even then it is not guaranteed to be smaller because it depends on how good the data can be compressed. It will definitely be larger if no compression is used because of the added header and signature.

Upvotes: 0

user207421
user207421

Reputation: 310840

No, it is completely baseless. SSL records contain a header and a digital signature for a start.

Upvotes: 0

Related Questions