Assembly Names
The name of an assembly consists of four parts
- The short name. On Windows this is the name of the Portable Executable (PE) file without the extension.
- The culture. This is an RFC 1766 identifier of the locale for the assembly. In general, library and process assemblies should be culture neutral; the culture should only be used for satellite assemblies.
- The version. This is a dotted number made up of four values — major, minor, build and revision.
- A public key token. This is a 64-bit hash of the public key that corresponds to the private key used to sign the assembly. A signed assembly is said to have a strong name.
The public key token is used to make the assembly name unique. Thus, two strong named assemblies can have the same PE file name and yet the CLI will recognize them as different assemblies. The Windows file system (FAT32 and NTFS) only recognizes the PE file name, so two assemblies with the same PE file name (but different culture, version or public key token) cannot exist in the same Windows folder. To solve this issue the CLI introduces the GAC (Global Assembly Cache) that is treated as a single folder by run-time, but is actually implemented using nested file system folders.
To prevent spoofing attacks, where a cracker would try to pass off an assembly appearing as something else, the assembly is signed with a private key. The developer of the intended assembly keeps the private key secret, so a cracker cannot have access to it nor simply guess it. Thus the cracker cannot make his assembly impersonate something else, lacking the possibility to sign it correctly after the change. Signing the assembly involves taking a hash of important parts of the assembly and then encrypting the hash with the private key. The signed hash is stored in the assembly along with the public key. The public key will decrypt the signed hash. When the CLR loads a strongly named assembly it will generate a hash from the assembly and then compare this with the decrypted hash. If the comparison succeeds then it means that the public key in the file (and hence the public key token) is associated with the private key used to sign the assembly. This will mean that the public key in the assembly is the public key of the assembly publisher and hence a spoofing attack is prevented.
Read more about this topic: Assembly (CLI)
Famous quotes containing the words assembly and/or names:
“That man is to be pitied who cannot enjoy social intercourse without eating and drinking. The lowest orders, it is true, cannot imagine a cheerful assembly without the attractions of the table, and this reflection alone should induce all who aim at intellectual culture to endeavor to avoid placing the choicest phases of social life on such a basis.”
—Mrs. H. O. Ward (18241899)
“Men have sometimes exchanged names with their friends, as if they would signify that in their friend each loved his own soul.”
—Ralph Waldo Emerson (18031882)