We introduce two novel techniques, random noise on unused channels and varying the inter-code phases on realistic framing repetition, to obtain an OCDM-based encryption scheme for which we can prove desirable security guarantees.OCIS codes: (060.4250) Networks; (060.4785) Optical security and encryption Introduction: Optical code division multiplexing (OCDM)-based security by obscurity has been promoted as a scaleable "security" solution for spectral-phase encoded OCDM systems operating at aggregate data rates of 100 Gb/s and beyond that can be realized with available technology through inverse multiplexing of 10 Gb/s tributaries, each carried on a OCDM code.[1] The approach is based on the early proposal that scrambling of the phase of the combined aggregate of OCDM codes in use increases the search space beyond the reach of an exhaustive search attack.[2] The solution has been demonstrated in the laboratory for an aggregate 40 Gb/s over 400 km transmission distance.[3] However, robustness against known plaintext (KPT) attacks was questioned by showing with some idealized assumptions that the search space is dramatically reduced from p n to p (n-m) , where n is the number of phase-locked wavelengths and also the maximum number codes available, (n-m) is the actual number of codes in use and p is the number phase states supported by the scrambler [4].