| 12345678910111213141516171819202122232425 |
- #ifndef HEADER_DH_H
- #include <openssl/dh.h>
- #endif
- DH *get_dh512()
- {
- static unsigned char dh512_p[]={
- 0x96,0x9A,0x23,0x95,0x6A,0xBA,0x24,0x9C,0xE6,0x46,0x5B,0xFF,
- 0xFE,0x76,0xEA,0xCF,0xA5,0xCF,0xE0,0xD8,0x94,0xDB,0x77,0x78,
- 0xC4,0x22,0xE8,0xC6,0x36,0x4B,0xDF,0x34,0xE1,0xA7,0x12,0x66,
- 0x6A,0x43,0x46,0x81,0x8D,0xFB,0xF3,0xE5,0xDC,0x13,0x19,0x3F,
- 0x90,0xFD,0x21,0x1C,0x2E,0x1F,0xCF,0xEF,0x5B,0x3F,0x25,0x75,
- 0x09,0xBB,0xF2,0x3B,
- };
- 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);
- }
|