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 8222687
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T14:21:53+00:00 2026-06-07T14:21:53+00:00

Microsoft seems to have created a certification jungle, that is hard to understand. Microsoft

  • 0

Microsoft seems to have created a certification jungle, that is hard to understand.

  • Microsoft X.509 certificate (.cer)
  • Personal Information Exchange (.pfx)
  • Assembly Signature Key Attribute (.snk)

    1. Would it be advisable to create an snk file based on pfx or cer?
      (Not sure if its even possible, and if its possible how is it done?)

    2. While an assembly can be signed with a password protected pfx, it
      doesn’t seem to be strong named though, unless it is signed with snk
      instead. But the snk has no password protection. Which one is safer
      to use? As I am the only developer in my project, I don’t have the
      multi-developer saftey environment issue, but still would like to
      know what is best approach.

Many Thanks,

  • 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-07T14:21:54+00:00Added an answer on June 7, 2026 at 2:21 pm

    A little clarification about your mentioned file types:

    • .cer-files are X.509 Certificates
    • .pfx-files are encrypted X.509 Certificates using a password-based symmetric key, also see PKCS #12 (Wikipedia)
    • .snk-files only contain the RSA key (public/private or public only)

    It doesn’t matter if you sign an assembly using .pfx-files or .snk-files, it will get strong named either way.
    Storing the RSA key as a encrypted certificate (.pfx) is of course more secure than storing just the unencrypted key (.snk).

    You can easily extract the key from those files in code using class System.Security.Cryptography.X509Certificates.X509Certificate2.

    To extract key from .pfx:

    /// <summary>
    /// Converts .pfx file to .snk file.
    /// </summary>
    /// <param name="pfxData">.pfx file data.</param>
    /// <param name="pfxPassword">.pfx file password.</param>
    /// <returns>.snk file data.</returns>
    public static byte[] Pfx2Snk(byte[] pfxData, string pfxPassword)
    {
        // load .pfx
        var cert = new X509Certificate2(pfxData, pfxPassword, X509KeyStorageFlags.Exportable);
    
        // create .snk
        var privateKey = (RSACryptoServiceProvider)cert.PrivateKey;
        return privateKey.ExportCspBlob(true);
    }
    

    Use privateKey.ExportCspBlob(false) to extract public key only! (e.g. for delay-signing of assemblies)

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

Sidebar

Related Questions

I have created a custom control using VB.NET in Visual Studio 2008 that gives
I have a series of dynamically created GridViews that I load. Everything works fine
I have an issue that seems to be identical to this question . I
Diagrams created with Microsoft SQL Server Management Studio have their default schema set to
I have about 5,000 hard copy forms that i need to be converted to
Microsoft seems to want us to stop using the MDI, but if more people
According to the 'Microsoft Office Word™ 2003 Visual Basic Reference', it seems the Document
Microsoft recently released to preview Azure web sites. I had been hoping that this
Microsoft J++ does not have a Double.parseDouble() method. How do I do this?
I have created a database with 8 tables in SQL Server Management Studio on

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.