| 12345678910111213141516171819202122232425 |
- #ifndef HEADER_DH_H
- #include <openssl/dh.h>
- #endif
- DH *get_dh512()
- {
- static unsigned char dh512_p[]={
- 0xAE,0x63,0x22,0x35,0x42,0xB6,0xE3,0x9D,0x7E,0x19,0x82,0x86,
- 0x4E,0x35,0x2E,0xB6,0xC6,0xCB,0xEE,0x31,0x12,0xC7,0x65,0xB1,
- 0x2E,0xFD,0x0D,0x5D,0x2E,0xED,0x68,0xF8,0x8F,0x34,0xFB,0x00,
- 0x78,0x12,0xCA,0x21,0x18,0x04,0x5F,0x27,0x25,0x29,0x9D,0x30,
- 0x44,0xF1,0xD4,0xC1,0x2F,0x69,0x51,0x40,0xB1,0x0C,0x09,0xA8,
- 0x3C,0x41,0x5C,0x73,
- };
- 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);
- }
|