I have some unusual size constraints for my data which may be relevant to the prescribed solution.
The scenario is as follows. Secure server A generates 240 bytes of data that need to be consumed by an offline client B. Client B needs to ensure that the 240 byte message was not altered. I tend to stumble ingloriously over the semantics and terminology of the security world, but I believe what I am looking for is 'data integrity'.
If I follow this process does it guarantee 'data integrity'? (I realize guarantee might be a strong word)
- Generate a public/private key pair on the server A
- Perform an asymmetric encrypt on the 240 byte message using the private key (a signing operation if I understand properly)
- Client B is issued the public key and the encrypted (signed) messsage
If Client B is successful in decrypting the message does this guarantee, at least academically, that the data has not been altered with?
Note 1: The number of bytes available on the transfer medium to Client B are at a premium, an increase of up to 40% increase due to the encryption could be tolerated, for example an RSA signature using a 2048-bit key resulting in 256 bytes from my 240 byte message would be acceptable.
Note 2: There is no expectation of privacy. I do not care if the data can be read by anyone. Only that the scheme can detect if the message has been tampered with.
Ancillary Question: Is there a recommended algorithm? I have been toying with RSA using 2048-bit keys.
Thank you security wizards, I don't know how you guys do it.