This question is about verifying the assembly to check whether it is tampered for malicious activity. When an assembly is created, metadata is generated. Metadata includes tables like type definition tables, type reference tables and manifest tables. Reference tables contain an entry for each assembly reference and the entry includes referenced assembly, its public key and a hash value. The manifest includes details of assembly referenced for each assembly and it includes the assembly name, its public key and Hashing algorithm. I also understand that during runtime when the assembly is loaded, it generates digital signature of the assembly with the public key embedded in the manifest and compares it with the digital signature already embedded in the assembly. If the digital signature matches then it loads. My questions are below.
- The Assembly Reference metadata table include a HASH. It is also mentioned that it is not used. Then what is its purpose?
- Does this assembly verification happen every time the assembly loads?
- What happens if it is not strongly typed?