Cryptography Stack Exchange is a question and answer site for software developers, mathematicians and others interested in cryptography. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am planning to encrypt the different fields of a database independently, using a symmetric encryption scheme (probably 3DES). Since some of the fields are as small as an integer, may that be problematic?

share|improve this question
up vote 1 down vote accepted

From the point of view of security, there is no problem with a key being longer than the ciphertext – 3DES has a 168-bit keysize and a 64-bit blocksize so for small messages it results in a ciphertext shorter than the key (at least without counting an IV).

However, in most block cipher modes the message gets padded up to a multiple of the blocksize, so a single 16-bit integer would result in at least 64 bits of ciphertext. That can get a bit inefficient if you have a lot of very small fields.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.