This document proposes an algorithm for anonymously assigning IDs to nodes in a network without a central authority. It builds on existing secure multiparty computation techniques like secure sum. The algorithm is run iteratively and assigns IDs from 1 to N, where each node only knows its own ID. Existing ID assignment methods require a trusted administrator. The proposed algorithm enhances privacy and scalability compared to alternatives. It uses techniques like Newton's identities, Sturm's theorem, and solving polynomials over finite fields to anonymously share data and assign IDs in a distributed manner.