A characterization of *-minimal algebras with involution