package server import ( "crypto" "crypto/ecdsa" "crypto/ed25519" "crypto/rsa" ) func isValidKeyType(key crypto.PublicKey) bool { switch key.(type) { case ed25519.PublicKey, *rsa.PublicKey, *ecdsa.PublicKey: return true default: return false } }