Lai received a B.Sc. in electrical engineering in 1982 and an M.Sc. in mathematics in 1984 at Xidian University (then known as Northwest Institute of Telecommunication Engineering). About 1982 he met James Massey, who was visiting the university to give lectures in cryptography. Lai served as interpreter for these lectures. He later became one of Massey's doctoral students at ETH Zurich, where he received his Ph.D. in 1992. Together they designed the IDEA cipher.