Passkeys and public-key authentication are both use asymmetric cryptography, but they serve different purposes and contexts:
Passkeys: A modern approach to passwordless authentication. They pair a device (like a phone) with a user account, using public-key cryptography to authenticate the user. For example, unlocking your Google account using your phone's biometric scanner instead of a password.
Public-key authentication: A traditional method primarily used for securing systems like SSH access. A user generates a public-private key pair and stores the public key on the server. The server verifies the user's identity based on the private key. For example, using SSH keys to log in to a remote server without needing a password.