| 12345678910111213141516171819202122232425 |
- #ifndef HEADER_DH_H
- #include <openssl/dh.h>
- #endif
- DH *get_dh512()
- {
- static unsigned char dh512_p[]={
- 0xB8,0xDD,0x6F,0x79,0x72,0xD2,0x5B,0xAA,0x5B,0xAA,0x86,0x18,
- 0x9C,0x0E,0xE1,0xD7,0x8E,0xB6,0x6C,0x19,0x47,0xE7,0xF0,0xDC,
- 0xCE,0xB0,0xFD,0x61,0x2E,0x34,0xCD,0x3E,0x62,0x3B,0x8A,0xA4,
- 0x0C,0x53,0x24,0xFE,0x03,0x1B,0x45,0x5B,0xBF,0x13,0x48,0x76,
- 0x07,0x59,0xDD,0x13,0x2E,0x87,0x11,0x0F,0x3E,0xAA,0xD7,0xF1,
- 0xAF,0x15,0x27,0x83,
- };
- 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);
- }
|