Create and use strong-named assemblies - .NET (2024)

  • Article

A strong name consists of the assembly's identity—its simple text name, version number, and culture information (if provided)—plus a public key and a digital signature. It is generated from an assembly file using the corresponding private key. (The assembly file contains the assembly manifest, which contains the names and hashes of all the files that make up the assembly.)

Warning

Do not rely on strong names for security. They provide a unique identity only.

A strong-named assembly can only use types from other strong-named assemblies. Otherwise, the integrity of the strong-named assembly would be compromised.

Note

Although .NET Core supports strong-named assemblies, and all assemblies in the .NET Core library are signed, the majority of third-party assemblies do not need strong names. For more information, see Strong Name Signing on GitHub.

Strong name scenario

The following scenario outlines the process of signing an assembly with a strong name and later referencing it by that name.

  1. Assembly A is created with a strong name using one of the following methods:

    • Using a development environment that supports creating strong names, such as Visual Studio.

    • Creating a cryptographic key pair using the Strong Name tool (Sn.exe) and assigning that key pair to the assembly using either a command-line compiler or the Assembly Linker (Al.exe). The Windows SDK provides both Sn.exe and Al.exe.

  2. The development environment or tool signs the hash of the file containing the assembly's manifest with the developer's private key. This digital signature is stored in the portable executable (PE) file that contains Assembly A's manifest.

  3. Assembly B is a consumer of Assembly A. The reference section of Assembly B's manifest includes a token that represents Assembly A's public key. A token is a portion of the full public key and is used rather than the key itself to save space.

  4. The common language runtime verifies the strong name signature when the assembly is placed in the global assembly cache. When binding by strong name at run time, the common language runtime compares the key stored in Assembly B's manifest with the key used to generate the strong name for Assembly A. If the .NET security checks pass and the bind succeeds, Assembly B has a guarantee that Assembly A's bits have not been tampered with and that these bits actually come from the developers of Assembly A.

Note

This scenario doesn't address trust issues. Assemblies can carry full Microsoft Authenticode signatures in addition to a strong name. Authenticode signatures include a certificate that establishes trust. It's important to note that strong names don't require code to be signed in this way. Strong names only provide a unique identity.

Bypass signature verification of trusted assemblies

Starting with the .NET Framework 3.5 Service Pack 1, strong-name signatures are not validated when an assembly is loaded into a full-trust application domain, such as the default application domain for the MyComputer zone. This is referred to as the strong-name bypass feature. In a full-trust environment, demands for StrongNameIdentityPermission always succeed for signed, full-trust assemblies, regardless of their signature. The strong-name bypass feature avoids the unnecessary overhead of strong-name signature verification of full-trust assemblies in this situation, allowing the assemblies to load faster.

The bypass feature applies to any assembly that is signed with a strong name and that has the following characteristics:

  • Fully trusted without StrongName evidence (for example, has MyComputer zone evidence).

  • Loaded into a fully trusted AppDomain.

  • Loaded from a location under the ApplicationBase property of that AppDomain.

  • Not delay-signed.

This feature can be disabled for individual applications or for a computer. See How to: Disable the strong-name bypass feature.

TitleDescription
How to: Create a public-private key pairDescribes how to create a cryptographic key pair for signing an assembly.
How to: Sign an assembly with a strong nameDescribes how to create a strong-named assembly.
Enhanced strong namingDescribes enhancements to strong-names in the .NET Framework 4.5.
How to: Reference a strong-named assemblyDescribes how to reference types or resources in a strong-named assembly at compile time or run time.
How to: Disable the strong-name bypass featureDescribes how to disable the feature that bypasses the validation of strong-name signatures. This feature can be disabled for all or for specific applications.
Create assembliesProvides an overview of single-file and multifile assemblies.
How to delay sign an assembly in Visual StudioExplains how to sign an assembly with a strong name after the assembly has been created.
Sn.exe (Strong Name tool)Describes the tool included in the .NET Framework that helps create assemblies with strong names. This tool provides options for key management, signature generation, and signature verification.
Al.exe (Assembly linker)Describes the tool included in the .NET Framework that generates a file that has an assembly manifest from modules or resource files.
Create and use strong-named assemblies - .NET (2024)
Top Articles
How to Tell How Old your League of Legends Account is
Drone Simulators: A Complete Guide [Updated for 2024]
Sandrail Options and Accessories
Santa Clara College Confidential
Umn Pay Calendar
How do you mix essential oils with carrier oils?
Citi Card Thomas Rhett Presale
OnTrigger Enter, Exit ...
Sotyktu Pronounce
Zendaya Boob Job
Olivia Ponton On Pride, Her Collection With AE & Accidentally Coming Out On TikTok
Https://Gw.mybeacon.its.state.nc.us/App
The Rise of Breckie Hill: How She Became a Social Media Star | Entertainment
ATV Blue Book - Values & Used Prices
The Binding of Isaac
อพาร์ทเมนต์ 2 ห้องนอนในเกาะโคเปนเฮเกน
Mephisto Summoners War
Otterbrook Goldens
Northern Whooping Crane Festival highlights conservation and collaboration in Fort Smith, N.W.T. | CBC News
Gino Jennings Live Stream Today
The Exorcist: Believer (2023) Showtimes
R Personalfinance
Aris Rachevsky Harvard
MLB power rankings: Red-hot Chicago Cubs power into September, NL wild-card race
How Long After Dayquil Can I Take Benadryl
Toothio Login
Strange World Showtimes Near Savoy 16
Roanoke Skipthegames Com
Darrell Waltrip Off Road Center
What Is a Yurt Tent?
Shelby Star Jail Log
Where to eat: the 50 best restaurants in Freiburg im Breisgau
Helpers Needed At Once Bug Fables
Die wichtigsten E-Nummern
What Is Opm1 Treas 310 Deposit
Human Unitec International Inc (HMNU) Stock Price History Chart & Technical Analysis Graph - TipRanks.com
In Branch Chase Atm Near Me
Diana Lolalytics
Trebuchet Gizmo Answer Key
Bitchinbubba Face
Craigslist Free Manhattan
M Life Insider
Weather Underground Cedar Rapids
Gopher Hockey Forum
Torrid Rn Number Lookup
How to Connect Jabra Earbuds to an iPhone | Decortweaks
Learn4Good Job Posting
Runescape Death Guard
Metra Union Pacific West Schedule
Philasd Zimbra
Att Corporate Store Location
Latest Posts
Article information

Author: Tuan Roob DDS

Last Updated:

Views: 5309

Rating: 4.1 / 5 (42 voted)

Reviews: 89% of readers found this page helpful

Author information

Name: Tuan Roob DDS

Birthday: 1999-11-20

Address: Suite 592 642 Pfannerstill Island, South Keila, LA 74970-3076

Phone: +9617721773649

Job: Marketing Producer

Hobby: Skydiving, Flag Football, Knitting, Running, Lego building, Hunting, Juggling

Introduction: My name is Tuan Roob DDS, I am a friendly, good, energetic, faithful, fantastic, gentle, enchanting person who loves writing and wants to share my knowledge and understanding with you.