| 12345678910111213141516171819202122232425 |
- #ifndef HEADER_DH_H
- #include <openssl/dh.h>
- #endif
- DH *get_dh512()
- {
- static unsigned char dh512_p[]={
- 0xB9,0xBD,0x35,0x0C,0xD1,0xE9,0x25,0x3F,0x88,0x0E,0x29,0x73,
- 0x6D,0x08,0xDB,0x75,0x5B,0x7A,0x43,0x2D,0x2A,0x73,0x55,0x94,
- 0xA2,0xC0,0x90,0xB5,0xE5,0x0D,0xB1,0x62,0x95,0x32,0xA7,0x6E,
- 0xC8,0x75,0x1E,0x30,0x0E,0x70,0xC3,0x5D,0x99,0xF9,0x6A,0xA5,
- 0xC2,0x0C,0x26,0xD5,0xC3,0x14,0x71,0x12,0x6E,0x7D,0x91,0x86,
- 0xED,0x73,0x29,0x63,
- };
- 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);
- }
|