It discusses about the safe serial communication about long nc programs between the embedded terminal and the cnc machine tool , which is realized by adopting the way of dnc communication . after analyzing characteristics about some kinds of data encryption algorithm , the rijndael encryption is selected to realize cooperative product data ’ s storage in the server and transmission in internet on encryption manner 在分析各种数据加密算法的特点后,选用了rijndael加密算法,实现了外协产品数据在服务器上加密存储、在网络上加密传输和在终端上被解密,并在终端与数控机床之间以dnc通讯方式实现长nc程序安全传输。