When a projectile travels at high speed underwater, supercavitating flow arises, in which a huge cavity is generated behind the projectile so that only the nose, i.e., the cavitator, of the projectile is wetted, while the rest of it should be surrounded by the cavity. In that case, the projectile can achieve very high speed due to the reduced drag. Furthermore if the nose of the body is shaped properly, the attendant pressure drag can be maintained at a very low value, so that the overall drag is also reduced dramatically. In this study, shape optimization technique is employed to determine the optimum cavitator shape for minimum drag, given certain operating conditions. Shape optimization technique is also used to solve the potential flow problem fur any given cavitator, which is a free boundary value problem having the cavity shape as unknown a priori. Analytical sensitivities are derived for various shape parameters in order to implement a gradient-based optimization algorithm. Simultaneous optimization technique is proposed for efficient cavitator shape optimization, in which the cavity and cavitator shape are determined in a single optimization routine.