I used this method to create a public key in a different section of my program at a different time.
publicKey = pivSession.GenerateKeyPair(
PivSlot.Authentication,
PivAlgorithm.Rsa2048,
PivPinPolicy.Never,
PivTouchPolicy.Never);
now I would like to read my old familiar public key again.
I thought, I could recreate my public key by accessing the slot, where the private key has been stored.
var x = pivSession.GetMetadata(PivSlot.Authentication).PublicKey;
Is this a correct approach???
Should I use a different slot on the Yubikey?
New contributor
markus-gruppe-e is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.