The broadcast nature of wireless communication make it intrinsically vulnerable to jamming and eavesdropping attacks. Spread-spectrum techniques spread narrowband signals over a wide bandwidth, and provide good resistance to noise and jamming attacks. However, spread-spectrum signals can still be intercepted if their used spreading codes are known. To tackle this issue, this paper proposes a lightweight design on generating secret spreading codes. A secret spreading code has all the desired properties of an ordinary spreading code, plus its unpredictability. Our method on generating secret spreading codes is shown to be resistant to cryptanalysis, and has little requirement on memory and computing resources.