sn
.NET strong name key management tool
TLDR
Create key pair
SYNOPSIS
sn [-k file] [-p input output] [-t file] [options]
DESCRIPTION
sn (Strong Name tool) creates and manages cryptographic key pairs used for signing .NET assemblies. Strong naming gives an assembly a unique identity by combining its name, version number, culture information, and a public key, preventing conflicts between assemblies with the same simple name.
The tool generates RSA key pairs for signing, extracts public keys for distribution without exposing the private key, and displays public key tokens (a short hash used as a compact identifier). It can also verify that an assembly's strong name signature is valid and re-sign assemblies with a different key pair.
Strong naming is part of the .NET Framework and Mono runtime. While still supported, Microsoft now recommends NuGet package signing for most scenarios, and strong naming is primarily used for legacy compatibility and Global Assembly Cache (GAC) registration.
PARAMETERS
-k FILE
Generate key pair.-p IN OUT
Extract public key.-t FILE
Show token.-tp FILE
Show public key.-v FILE
Verify assembly.-R FILE KEY
Re-sign assembly.
CAVEATS
.NET specific. Windows tool via Mono. Strong naming deprecated.
HISTORY
sn (Strong Name tool) is part of the .NET SDK for creating and managing cryptographic keys for assembly signing.
