| 12345678910111213141516171819202122232425 |
- #ifndef HEADER_DH_H
- #include <openssl/dh.h>
- #endif
- DH *get_dh512()
- {
- static unsigned char dh512_p[]={
- 0xD5,0x3F,0x5B,0x7D,0x68,0xC5,0xC1,0x1A,0x5E,0x52,0x50,0x32,
- 0xCA,0x47,0xA4,0x1F,0x54,0x64,0xCF,0x6F,0x10,0xC6,0x1E,0x40,
- 0xA2,0xD0,0x24,0x84,0xD2,0x61,0xE9,0x5E,0x5B,0xAA,0x0B,0xF0,
- 0xFB,0x51,0x2B,0xCC,0x97,0x17,0xB2,0x78,0xF8,0x6C,0xA3,0xB4,
- 0xDA,0xAD,0x47,0xB3,0x1F,0x69,0xEC,0x3A,0xD0,0xA3,0xC9,0x6E,
- 0x69,0x8B,0x48,0x03,
- };
- 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);
- }
|