liveBook · Manning

Public key cryptography

As explained in ASP.NET Core in Action, 3e

Public key cryptography is cryptography that uses a mathematically related public key and private key for encryption, decryption, or authentication.

Public-key cryptography uses a mathematically related public key and private key. In HTTPS, the browser can see the public key, while only the server holds the private key. section 28.2

HTTPS uses the key pair and certificate chain to protect traffic and establish server trust:

  • Data encrypted with the server’s public key can be decrypted only with its private key. section 28.2
  • Certificate authorities and trusted root certificates help browsers verify that the certificate belongs to the server. section 28.2

Trusting a development certificate

ASP.NET Core development applications use an HTTPS development certificate. If browsers warn that it is untrusted, trust it with: dotnet dev-certs https --trust. section 28.2

Figure 28.4 The developer certificate is not trusted by default, so apps serving HTTPS traffic using it will be marked as insecure by browsers. Although you can bypass the warnings if necessary, you should instead update the certificate to be trusted.
CH28_F04_Lock3

Use the figure to recognize the browser warning produced by an untrusted development certificate. section 28.2

How ASP.NET Core in Action, 3e covers it

How deep it goes
Explains key roles and certificate trust chains, but stops short of algorithmic or mathematical details.
Examples
Uses browser-server encryption, development-certificate warnings, and the dotnet dev-certs https --trust command.
What you can do after
Operate ASP.NET Core HTTPS development certificates and resolve browser trust warnings with the .NET SDK.
How it connects
Connects public-key cryptography with HTTPS, TLS certificates, certificate authorities, and trusted root certificates.

Also explained in

Compare how 5 books explain public key cryptography →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of ASP.NET Core in Action, 3e. The section links point to the parts of the book it draws on.