| 12345678910111213141516171819202122232425 |
- #ifndef HEADER_DH_H
- #include <openssl/dh.h>
- #endif
- DH *get_dh512()
- {
- static unsigned char dh512_p[]={
- 0xF0,0x8F,0x10,0x43,0xFA,0x65,0x06,0xEC,0xDD,0xC2,0x9C,0x0B,
- 0xEE,0x78,0x7F,0x33,0xDD,0xC4,0x02,0xE2,0xDC,0x51,0x05,0x2F,
- 0xF5,0x20,0x6A,0x28,0xA0,0x06,0x07,0x86,0xE4,0x45,0x6D,0xAE,
- 0x77,0x29,0x7C,0x72,0xDC,0x6E,0x02,0x87,0x8A,0x3D,0x43,0xF2,
- 0x3C,0xB8,0x1E,0x18,0xC6,0x40,0x9F,0x0C,0x2B,0x42,0xE1,0x37,
- 0x33,0x03,0xD3,0x5B,
- };
- 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);
- }
|