Key validation