| 12345678910111213141516171819202122232425 |
- #ifndef HEADER_DH_H
- #include <openssl/dh.h>
- #endif
- DH *get_dh512()
- {
- static unsigned char dh512_p[]={
- 0x95,0xC8,0x9C,0x13,0xC7,0x80,0x1E,0x4E,0x5D,0x18,0x4F,0x0D,
- 0x56,0x7A,0xCB,0xFE,0xE3,0xFF,0x10,0xE4,0x7C,0xF7,0x7E,0x7F,
- 0xF7,0x14,0x48,0x21,0x74,0x34,0xF6,0x80,0xF1,0xAF,0xD7,0x88,
- 0xDD,0xFF,0xB2,0x87,0x95,0xF6,0x10,0x06,0xD6,0x8F,0x11,0xD8,
- 0xEA,0xAC,0x6F,0x15,0x73,0xC3,0xC0,0x67,0xB0,0x4F,0xC1,0xAD,
- 0xBD,0x21,0xE7,0xE3,
- };
- 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);
- }
|