Suppose I want to apply an integrity check on a message sent via the Internet (to check if a message has been modified while transmission). I have the following questions:

  1. If I consider Hash value of length 32 bits to be added as a layer in the packet header (since a packet header length is of length 32 bits), is it considered reasonable in terms of performance? In other word, does generating hash value of this length causes any performance issue?
  2. When I use a digital signature, is the operation of signing this hash value (using symmetric key of length 32 bits as well) considered to be an overhead?

2 Answers 2


In the first case you are calculating digest or hash of a message for integrity check and transmitting it in header . Which in terms of performance is fine and a standard way to implement message integrity check

In second case it seems your concern is digitally signing the message which always involve private key symmetric key has nothing to do with digital signature . Even if you want to anyhow achieve integrity with signatures and send the signed hash of message other side needs your ppublic key to verify the integrity ...Which will obviously causing overheads if integrity check is is only the concern not authenticity


You are mixing two different concepts into one.
Consider two things: Is the hash to check for integrity for data due to interference that is not likely to have been tampered with? Or is it for security? A TCP packet has a checksum (like a hash), for purposes of determining if interference changed part of the packet.
Security hashes, and even file integrity hashes, started with 128 bits, and now are in the 256-512 bit range. 32-bits cannot be considered for any type of secure application, including a digital signature.
A digital signature with a 32-bit key and 32-bit hash is only a little bit better than ROT13 and maybe worse as it might give a false sense of security.

  • Yes, I want to protect the message from tampering while it is in transit so I thought I can just do something like s=H(M || TS), where TS is timestamp, then send M||s .
    – Alli
    Commented Oct 18, 2016 at 16:02
  • When receiving, I use s' = H(M ||TS) for validation and then check if s=s'
    – Alli
    Commented Oct 18, 2016 at 16:04
  • Where TS in both cases should be fixed
    – Alli
    Commented Oct 18, 2016 at 16:04
  • Based on the "secure enough" philosophy, what are you trying to protect from? That will help to discern how to be "secure enough". If you are trying to protect the message from tampering, and that message will have credit card information, then it isn't enough. If you want to connect to your home network from afar, it likely is.
    – MikeP
    Commented Oct 19, 2016 at 2:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .