A digital signature enables people who receive a file to authenticate that it comes from you and is unchanged since you signed it. It has two parts: a private key that only you have access to, and a public key that you distribute to people you want to exchange messages with.
You can digitally sign files when you add them to a ZIP archive.
You can also digitally sign an entire archive. A signed ZIP archive can contain a mixture of signed and unsigned files. People who receive a signed archive can use the certificate to confirm that the archive as a whole is not changed. If you only sign individual files, recipients can confirm that the signed files are unchanged. They cannot confirm whether files have been added or removed from the archive.
You must have a digital certificate installed on your Mac Login Keychain to attach digital signatures to files and archives. See the Keychain Access Help for information on creating and managing digital certificates.