Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8023279
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T22:31:16+00:00 2026-06-04T22:31:16+00:00

Say I’d like to release an open-source class library. I’m wondering if I should

  • 0

Say I’d like to release an open-source class library. I’m wondering if I should publish the snk with it or not. I do want an snk to make the dll GAC-friendly for example. I’ve seen big projects with a public snk (NHibernate) and with a non-disclosed one (DevExpress), and also small projects from both sides, so there’s no general agreement, that’s for sure.

Let’s say I don’t publish the private key. The users of this library, who are developers themselves, will either need to recompile my sources if they want to make any changes, or make an exception for the strong name verification. Both a pain in the neck, I’ve been there.

Let’s say I publish it. I fail to see how that can be exploited. CAS and stuff is not in wide use anymore, what’s more, it’s even deprecated in .NET 4.5. So it’s not like poor users grant some rights to my assembly based on its public key token and the bad guys produce a foul assembly with the same token. If a bad guy can put his own dll on someone’s computer, then it’s really not the strong name that’s going to stop them.

I don’t think anyone ever checks the public key tokens of assemblies. Sure, the runtime checks that it hasn’t changed since the referring assembly was compiled, but that’s all. Publishers don’t publish their token, so for all I know, I may reference a foul assembly in the first place when I compile mine.

So I’m leaning towards publishing the snk. Looks to me like it provides little security in theory, no security in practice, so why make lives of my users harder. And maybe I should do X.509 code signing (that one with a really private private key), but I think most people don’t check that anyway either.

To publish or not to publish? The best argument wins. Theoretical side, practical side, MS™ guidelines, all welcome.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T22:31:18+00:00Added an answer on June 4, 2026 at 10:31 pm

    You shouldn’t distribute your strong naming key, but that has little, if anything, to do with security.

    Strong naming is an identification technique, not a security measure. It is meant to prevent accidental assembly identity collision only. (For it to be strong enough for “serious” security use, it would need to revokable keys instead of self-generated keys.)

    However, preventing accidental collision is quite a sufficient reason for not distributing your signing key on an open-source project. It’s the main thing preventing your version 1.2.3.4 from looking identical to a version 1.2.3.4 compiled from modified source by somebody else. Given that one of the primary goals of opening up the source code for a project is usually to allow folks to distribute assemblies compiled from altered code, one might even argue that properly individualized strong naming is more important for an open-source project than for a closed source distribution.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Say I have a class named Frog, it looks like: public class Frog {
Say I want to make a regex that splits a optional version number from
Say for example I have a textview in class A, and I want to
Say there is a source file a.c with some function func_a. I would like
Say I have a select box eg <div data-bind='visible: someProp'> <select class=selectSubWidgets data-bind='options: subWidgets,optionsText:
Say I have a Telerik MVC Grid, AJAX bound and I want to put
Say we have deep hashes like: b = {1 => {2 => {} },
Say i have a few fields like the following: abd738927 jaksm234234 hfk342 ndma0834 jon99322
Say I have classes class A{ //code for class A } class B{ //code
Say I want to draw a Ball in the scene and here are two

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.