How signing a file works:
You calculate some kind of hash value from the file's content, H. It doesn't really matter what hash you use (could be SHA-2 or maybe even the same procedure used for Bitcoin addresses), this hash is only used to distinguish the file from all other signed files and it need not really be secure against a malicious collision attack (although it doesn't hurt if it is of course). Then you register a name "hash/H", which should still be free because H is basically random. It is not possible for anyone to "squat" this name to prevent you signing your next release because it can't be predicted without the actual file what it will be. As value of this name you then store signatures for the file, possibly with a different / more secure hash (could be SHA-512 or SHA-3, while I think it is good if H is not too long and thus not SHA-512 itself; I don't know if there's a maximal name length). The value could look like this:
Code: Select all
{
"id/domob": {"method": "sha256", "signature": "HDRw84xtECK24iia+yyQBoASkcUsFPUHKG+Iou5oXXdTc14g5Cp+TZcNTi2qVjdN444vBS3We98r9+h5iiBDJLA="},
"d/domob": {"method": "sha512", "signature": "G8IODHIfUkoQ8r2ScxzNmqcnmQFhHLGPYk7mlOblxmaam4LWBXhYZ5VVLnxplopStPvwCMEC7WrttVPNnu68tiU="}
}
Apart from adding this entry in the blockchain, you don't have to change the file in any way and can just put it on your download page as you would without signature. (Or do whatever you want.)
How to check a signature:
Given a downloaded file, calculate the hash H by the same method as before. (If in the future multiple hashing methods for this first step are introduced because of technological evolution, just try all of them in some order.) See if "hash/H" exists, and if not, there's no valid signature. If it exists, fetch the value and check the signatures there against your file. Thus you get (if successful) a list of namecoin names (identities or domains in the probably most common case) which can be displayed to the user, so that he/she can decide whether or not to trust them.
EDIT: It seems not necessary to require that the hash/H name is updated over time since conflicts are very unlikely anyway. Instead I suggest that when validating a file, the whole history of the name is searched and every valid signature found for any update is reported. That way, one can add signatures by more people over time if that should be wanted.