In recent years, walking training has been widely developed due to the increasement of patients with lower extremity motor dysfunction caused by spinal cord injury and stroke. Robotic gait-orthosis is a complex system and gait planning algorithm is an important aspect of it. Gait-orthosis should have the characteristics of naturalness, comfort and safety. In view of the importance of gait safety, this paper proposes gait by a method called security redundancy gait pattern generator (SRGPG). The SRGPG gait algorithm insures the safety of gait from two aspects, namely, gait parameter calculation and gait planning. On one hand, the gait parameter calculation is based on bionics principle and users' physical condition. On the other hand, in the gait planning, the whole gait is divided into three sub stages and the motion of all joints is planned in each sub stage. The SRGPG are tested by the simulation and experiment with XKF-01 robotic gait-orthosis. By comparing SRGPG and CGA gait results, the similarity between SRGPG gait curve and normal people's walking trajectory is verified. Finally, the experimental results demonstrate that the lower limb rehabilitation gait algorithm based on SRGPG is feasible and safe.