Updated 2024-02-05
From NuGet 4.6 package signing is supported. An Author signature can optionally, be included when distributing NuGet packages via NuGet.org or via a separate distribution channel.
The Author signature provides two key benefits:
- It cryptographically verifies that the package has not been changed since it was signed by the author (to the limits of the hashing algorithms which is are currently supported SHA-2-256/ SHA-2-384/ SHA-2-512).
- It identifies the author through an external chain of trust, as the author must provide proof of identity to obtain a code signing certificate from an public certificate authority. On Windows, the list of trusted publishers and root certificate authorities configured in the Operating System further limits which publishers and certificate authorities are trusted for code signing.
Noting for clarify in addition to the Author signature, NuGet.org also provides a Repository signature which is automatically applied to all packages. This signature verifies the package has not been tampered with from when it was uploaded to NuGet.org but do not verify the identity of the author.
The NuGet CLI provides the nuget verify
command to check both signatures.
In additional to packages signatures, NuGet.org provides Package ID prefix reservation. A prefix reserved by an owner can not be used to prefix packages by other parties (unless delegated or made public).
For example if the Microsoft
prefix is reserved. Another undelegated party can not upload a package with the Microsoft.
prefix i.e. Microsoft.SomePackage
.