server: distinguish key type