#ifndef HEADER_DH_H #include #endif DH *get_dh512() { static unsigned char dh512_p[]={ 0xB3,0xDB,0x56,0x63,0x38,0x40,0xF6,0x12,0xF6,0x12,0xBD,0xBA, 0x2D,0x16,0x1E,0xDA,0x2B,0x06,0xFD,0xEE,0x9D,0x2F,0x91,0x52, 0x30,0x2F,0x74,0x9E,0xDE,0xE7,0x8B,0x8E,0x01,0x9C,0xCE,0x52, 0x42,0xD9,0xA7,0xAD,0x39,0x6C,0x04,0xD6,0x25,0x9F,0x79,0x63, 0xE6,0x71,0xFD,0x66,0x54,0x01,0x61,0xB1,0x57,0xFC,0x9C,0x88, 0xD4,0xCB,0x8D,0xE3, }; static unsigned char dh512_g[]={ 0x02, }; DH *dh; if ((dh=DH_new()) == NULL) return(NULL); dh->p=BN_bin2bn(dh512_p,sizeof(dh512_p),NULL); dh->g=BN_bin2bn(dh512_g,sizeof(dh512_g),NULL); if ((dh->p == NULL) || (dh->g == NULL)) { DH_free(dh); return(NULL); } return(dh); }