| 12345678910111213141516171819202122232425 |
- #ifndef HEADER_DH_H
- #include <openssl/dh.h>
- #endif
- DH *get_dh512()
- {
- static unsigned char dh512_p[]={
- 0x8A,0xA6,0xF0,0xEF,0x5E,0x6E,0x71,0x62,0x1A,0x5F,0xE7,0xA8,
- 0xF8,0x81,0xD3,0x28,0x7E,0x4A,0x57,0x35,0xE3,0x55,0x72,0x9F,
- 0x0F,0xB8,0x39,0x5F,0x80,0x5B,0xA6,0x38,0xB9,0xAB,0xE6,0xCD,
- 0x9A,0x08,0x3E,0x8D,0xE2,0xB4,0xFB,0xC9,0x2B,0x74,0x36,0xD5,
- 0x0E,0x41,0x3F,0x6B,0x99,0xA5,0xB4,0x8E,0x09,0xC2,0x5E,0x81,
- 0xB5,0xB9,0x71,0x93,
- };
- 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);
- }
|