Signal and power integrity design in the time domain requires equivalent circuit models for interconnects and packages, whose descriptions may only be available as tabulated impedance or admittance parameters. Accurate models for these components should maintain their physical properties including causality, stability, and passivity. Even though a heuristic approach, pole flipping (i.e., changing the sign of the real part of an unstable pole) has proven to be sufficiently accurate for many applications, resulting in models with ensured causality and stability. In this article, we address the problem of generating passive scalar models, such as driving point impedances or admittances, based on an existing causal, stable, but nonpassive model. Our approach is based on using sum-of-squares (SOS) polynomials and results in a convex optimization problem, hence a global optimum is obtained. We obtain approximations through two distinct SOS algorithms: a coefficient and a sampling-based method. We also present a simple passivity test for such functions based on calculating the roots of numerator and denominator polynomials, which provides an intuitive link among existing approaches based on solving an eigenvalue problem.