liveBook · Manning

Public key

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

A public key is a cryptographic key intended for distribution that can be used with its corresponding private key for encryption or verification.

A public key is the shareable half of a cryptographic key pair. In HTTPS, a server sends its public key so a browser can encrypt data that only the server’s private key can decrypt. section 28.2

Keep these roles distinct:

  • Public key: distributed openly and used by the browser for encryption. section 28.2
  • Private key: retained by the server and used to decrypt data encrypted with the public key. section 28.2
  • Certificate trust: depends on a trusted certificate authority and root certificate, not merely on possessing a public key. section 28.2

HTTPS development certificate

When an ASP.NET Core application uses a development certificate, the server presents its public key to the browser. An untrusted certificate can trigger a browser warning even though the public/private key relationship still supports HTTPS encryption. 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 how an untrusted development certificate appears in a browser. section 28.2

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

How deep it goes
Defines the public/private relationship and certificate trust chain, but stops short of cryptographic algorithms or implementation internals.
Examples
Uses browser-to-server encryption and an ASP.NET Core development certificate that produces an untrusted-certificate warning.
What you can do after
Evaluate HTTPS certificate warnings by separating encryption provided by the key pair from trust provided by certificate authorities.
How it connects
Connects public-key cryptography with private keys, HTTPS, TLS certificates, certificate authorities, and root certificates.

Also explained in

Compare how 8 books explain public key →

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.