New File Signatures

I’m thinking of adding a unique file signature to the header of a new encrypted file type created by a program I’m currently designing. I’m thinking this would be a very sensible thing to do, especially because I cannot predict the data to follow which will depend on user input plus the password. There is always a chance that the resulting file will accidentally throw, a FP or appear to be corrupted data if no file signature is present.

Since there are so many security analysts around here, I thought perhaps someone might have something to say about this. Maybe the chances of a FP are very low for an unknown file extension, but the opposite may well be true. I also thought of using known extensions. I wasn’t sure where to post this question so it ended up in the chat section.

Thanks in advance.

Hello,
yes, it is good practice to put at the beginning of file some marker (magic) to allow detect file type by first few bytes of the file content. Many files types uses this (see examples: http://www.garykessler.net/library/file_sigs.html in my opinion some of them are not well chosen and conflict with others – I prefer to put the magic to offset 0).

Milos

Hi Milos,

Thanks for confirming my thoughts. It was only recently I thought about doing this. I will definately do so. Excellent support here.

Regards.