| 12345678910111213141516171819202122232425 |
- #ifndef HEADER_DH_H
- #include <openssl/dh.h>
- #endif
- DH *get_dh512()
- {
- static unsigned char dh512_p[]={
- 0xC4,0xA5,0x12,0x8D,0x07,0x6B,0x7C,0x00,0x1A,0x5E,0xFE,0xF5,
- 0xA8,0x36,0x55,0xBB,0xBD,0x23,0x69,0x76,0x34,0xA0,0x36,0x79,
- 0x15,0x70,0x22,0xFF,0xAB,0xA8,0x8F,0xAF,0x7B,0x4C,0x9F,0xAB,
- 0x16,0x7D,0xB6,0x92,0x51,0xE6,0x0C,0x50,0x39,0xCB,0x92,0x92,
- 0x29,0x24,0x03,0x32,0xC7,0x26,0x26,0x36,0xA5,0x10,0x35,0x42,
- 0x7B,0xA6,0x0F,0x33,
- };
- 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);
- }
|