| 12345678910111213141516171819202122232425 |
- #ifndef HEADER_DH_H
- #include <openssl/dh.h>
- #endif
- DH *get_dh512()
- {
- static unsigned char dh512_p[]={
- 0xE9,0xFF,0x32,0x13,0x76,0x3B,0xCC,0x89,0xEC,0xAD,0x06,0xA3,
- 0x0B,0x60,0x0F,0x55,0xBF,0x12,0xD3,0xDB,0x64,0x41,0x25,0xF1,
- 0xF4,0xF9,0xBF,0x37,0x7A,0xB1,0x8F,0xD8,0xCB,0x35,0xD9,0x51,
- 0xC3,0x7B,0x1A,0x63,0xCC,0x4A,0x02,0x7A,0xDF,0xDD,0x74,0x40,
- 0x7E,0x3A,0xA1,0xB0,0x0B,0x51,0xEC,0xBA,0x10,0x19,0x70,0x6B,
- 0xF5,0xDF,0xEC,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);
- }
|