key_manager should pack/unpack `next_id_`