| 12345678910111213141516171819202122232425 |
- #ifndef HEADER_DH_H
- #include <openssl/dh.h>
- #endif
- DH *get_dh512()
- {
- static unsigned char dh512_p[]={
- 0xB4,0xC4,0xCB,0xF8,0x94,0xEE,0x4D,0x73,0x23,0xF9,0xB0,0xC4,
- 0x07,0xB5,0x69,0xC8,0x7B,0x85,0x10,0xA6,0xB6,0x56,0x2B,0x52,
- 0xDB,0x7C,0xC6,0x39,0x34,0x1B,0xAB,0x68,0xB2,0x05,0x8F,0x87,
- 0x0D,0x53,0xD1,0x32,0x85,0xDC,0xEE,0xA4,0x92,0xBF,0x1B,0x40,
- 0x99,0x76,0xF5,0x28,0xA4,0xAC,0x35,0xD6,0x3F,0x7C,0x23,0xE0,
- 0xBC,0xE9,0x34,0x03,
- };
- 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);
- }
|