Microsoft seems to have created a certification jungle, that is hard to understand.
A little clarification about your mentioned file types:
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
.
///
/// Converts .pfx file to .snk file.
///
/// .pfx file data.
/// .pfx file password.
/// .snk file data.
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)