Yubikey
YubicoBitwardenGPG ToolsDonate Coffee
PIV
PIV
  • Introduction
  • Getting Started
    • ⭕1. Interface
    • ⭕2. PINs
      • 🟣About
      • 🟣Defaults
      • 🟣Change
    • ⭕3. CLI
    • ⭕4. Certificates
    • ⭕5. Reset
  • SLOTS
    • ⭕9A
      • 🟣Certreq
      • 🟣OpenSSL
    • ⭕9C
    • ⭕9D
    • ⭕9E
  • Generate
    • ⭕File Extensions
    • ⭕With OpenSSL
      • 🟣distinguished_name
      • 🟣keyUsage
      • 🟣extendedKeyUsage
    • ⭕With XCA
  • commands
    • ⭕info
    • ⭕reset
    • ⭕access
      • 🟣change-management-key
      • 🟣change-pin
      • 🟣change-puk
      • 🟣set-retries
      • 🟣unblock-pin
    • ⭕certificates
      • 🟣delete
      • 🟣export
      • 🟣generate
      • 🟣import
      • 🟣request
    • ⭕keys
      • 🟣attest
      • 🟣export
      • 🟣generate
      • 🟣import
    • ⭕objects
      • 🟣export
      • 🟣generate
      • 🟣import
Powered by GitBook
On this page
  • ykman piv keys export OPTIONS SLOT PUBLIC-KEY
  • HELP
  • EXAMPLE

Was this helpful?

  1. commands
  2. keys

export

Export a public key corresponding to a stored private key. This command uses several different mechanisms for exporting the public key corresponding to a stored private key.

ykman piv keys export OPTIONS SLOT PUBLIC-KEY

Options
Description

-h, --help

Show this message and exit.

-F, --format [PEM|DER]

Encoding format. [default: PEM]

-P, --pin TEXT

PIN code (used for --verify).

-v, --verify

Verify that the public key matches the private key in the slot.

Arguments
Description

PUBLIC-KEY

File containing the generated public key. Use - to use stdout.

SLOT

PIV slot of the private key.

HELP

Usage: ykman.exe piv keys export [OPTIONS] SLOT PUBLIC-KEY

  Export a public key corresponding to a stored private key.

  This command uses several different mechanisms for exporting the public key corresponding to a stored private key, which may fail. If a
  certificate is stored in the slot it is assumed to contain the correct public key. If this is not the case, the wrong public key will be
  returned.

  The --verify flag can be used to verify that the public key being returned matches the private key, by using the slot to create and verify a
  signature. This may require the PIN to be provided.

  SLOT        PIV slot of the private key.
  PUBLIC-KEY  File containing the generated public key. Use '-' to use stdout.

Options:
  -F, --format [PEM|DER]  Encoding format.  [default: PEM]
  -v, --verify            Verify that the public key matches the private key in the slot.
  -P, --pin TEXT          PIN code (used for --verify).
  -h, --help              Show this message and exit.

EXAMPLE

PreviousattestNextgenerate

Last updated 2 years ago

Was this helpful?

⭕
🟣