Comments (4)
Things to consider
bash-3.2$ set -x; for b in 4096 3072 2048 1024 512; do time openssl dhparam -out `mktemp -d`/dhp $b; done
+ for b in 4096 3072 2048 1024 512
++ mktemp -d
+ openssl dhparam -out /var/folders/c2/k37yy5v51qzd5_rfrwd_sd7r0000gn/T/tmp.b5M8ivlD/dhp 4096
Generating DH parameters, 4096 bit long safe prime, generator 2
This is going to take a long time
...............................................................+......................................................................................................................................................................................................................................................................................................................................+..................................................................................................................................+........................................................................................................................................................................................+..............................................................................................................................................................................................................................................................................................................................................+................+......................+..............................................................................................................................................................................................................................................................+............................................................................................................................................................................................................................................................................................................+..........................+......................................................................................................................................................................................................................................+...............................................................................................................................................................+...........................+............................................................................................................................................................................................................................................................................................................................................................................................................................................+..................................................................................................................................................................+...........................................................+...............................................................................................................+...........................................+............................................................................................................+...........................+..................................................................................................................................................................................................................................................................................................................................................................................................................+.............+......................................................+.............................................................+.....................................................................................................+.............................................................................................................+....................................................................+.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................+...............+.........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................+..............................+...............................................................................................................................................................................+.....................................................................................................................................................................................................................................................................................................................................................................................................+............................................................................................................................................................................................................................................................................................................+...............................................................................................................................................................+................................................................+.......................................................................................+...................................................................................+.....+...................................................................................................................................................+......................................................................................................................................................................................................................................................................................................................................................................................................................................+................................................................................................................................................................................................................................................................................................................................+................................................................................................................................................................................................................................................................................................................................................................................+.......................................................................+...........................................................................................................................................+......................................+........................................+.......................................................................................................................................................................................................+........+.................................................................................................+................................................................................................................................................+............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................+..............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................+..........................+.............+...........................................................................................................................................................................................................................................................................................................................+............................................................................................+...........+..............................................+..........................................................................+.............................................................................................................................................................................................+....................................................................................................+.................................................................................................................................................................................+............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................+...................................................................................................................................................................................................+..................................................................................+................................................................................................+..............................................................................................................................................................................................................................................................................................................+........................................................................................................................................................................................................+................................................................................................................................................+...............................................................................................................................................................................+...............................................................................................................................+......................................................................................................................+................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................+...................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................+...................................................................................................+....................+.................................................................................................................+.......................................................+...............+.....................................................................................................+...........................................................................................................................+.........+.................+..........................................................................................................................+...........................................................+......+.....................................................................................................................................................................................+........................................................................................................................+................................................................................................+...................................................................................................................................................................................................+...........................................+.............................................................................................................................+..+.......................................................................................................+......................................................................+..................................................................................................................................................................................................................................................+..............................................................................................................................................................................................................................................+......................................................+.........................................................................................................................................................................................................................................................................................................................................................................................................+........................+.......+......................................+........................................................................................+............................................+...............................................................................................................+.........................................................................................................+.....................+..........................................................+.............................................................................................................................................................................................................................+.............................................................................................................................................................................................................................................+............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................+.....................................................................................................................................+.........................................................................................................................................................................................................+.....................................................................................................................................................................................................................................................................................................+.....................................................................+...................................................................................+.........................+............................................................................................................................................................................................................................+.....+................................................................................................................................................................................................................+...................+...........................................................................................................................................................................................................................................................+...........................................................................................................................................................................................................................+......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................+...............+................................+..............................................................................................................................................................................................................................................................+...................................................................................................................................................................................................................+..................+............................................................................................................................................................................................................................................................................................................+........................................................................................................................................+..............................................................................................................................................................................+.....................................................................+..........................................................................................+...................................................................+.......................................................................................................................+..............................................................................................................................+.............................................................................................................................................................................................................................................................................+.........................+.................................+................................................................................................+..............................+.................................................................................................................................+.......................................................................................+............................................................................................................................................................................................................................................................................................................................+...........................................................................................................+.+...............................................................................................................................................................................................................................................................................+.....................................................................+.....................................................................................................+............................................................................................................................................................................................................................................................................................................................................................................................+..................................................................................................................................................................................................................................................................................................................................................+.........+..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................+...................................................................................................+...........................................................+.....................................+................................................................................................................................+.................................................................................................+..................................................................................................................................................................................................................................................................+..............................................................+..............................................................................................................................................................+.............................................................................................................................................................................................+......................................................................................................................................................................................................................................+....................................+..........................................................................................................................................................................................................................................................................................+..........................................................................................................................................................................+..........................................................................................................................................................................+.................................................+..............................................................................................................................................................................................................................................................................................................................................................................................+................................................................................................................................................................+...........+.........................+.............................................................................................................+...........................................................+..................................................................................................................................................................................................................................................................+...................................................................................................................................................................................................+...............................................................................................................................+...+.....+..........................................................................+...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................+..........................+.....+.......................................................................................................................................................................................................................................................................................................................+......................................................................................................................................................................................................................................................................................................+.........................................................................................................+.................................................................................................................................................................+................................................................................................................................................................................................+..............................................................................................................................................................................................................................................................................................................................................................................+...........................................................................................................................+...............................................................................................+....................................................+.................+...................................................................................................................................+..................................................................................................................+......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................+.......................................................................................................................+.........+................................................................................................................................................................................................................................................................................................................................................................+................................................................................................................................+.......................................................................................................................................................................................................................................................................................................................................+.................+...........+..........................+...................................................................................................................................................................................................................................................................................................+...+................+...................................+.....................................................................+......................................................................................................+.........+....................................................................................................................................................................+.................................................................................................................+................................................................+....................................................................................................................+...................................................+...............................................................................................................................................................................................................................................................................................................................+................................+....................................................+...............+.....................................................................................................................................................................................................................................................................................................+...................................................................................................................................................................................+......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................+...............................................................................................................+..................................................................................................................................................................................................................................................................................+...+......................................................................................................................................+............................................................................................+..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................+.................................................................................................................................................................................................................................................+...............................+....................+................+...................................................................+...............................................................+....................................................................................................................................................................................................................................................................................................................+..........................................................................+............................+.......................................................................+.........................+................................................................................................................................................................+.....................................................................................................................................................................................................................................................+........................................................................................................................................................................................................................................................................................................+......................................................................................................................................................................................................................................................................+....+.................................................................+.................................................+..........................................................+...........................................................+.....................................................................+..+.+.............................................................................................................................................................................................................................................................................................................................................................+...............................................+..............................................................................................................................................................................................+......................................+.................................................................................................................................................................................................................................................................................................................................................................................................................................................................+.......................................................................................................................................................................................................................................................................................................+...............................................................................................................................................................................................................................................................................................................................................+....................................................................................................................+..........................................................+..............................................................................................................................................................................................+........................................................................................................+........+.....+................................................................+............+..................................................................................................................................................................................................................................................................................................................................................................................................+..........................+....................................................+...................................................................+.......................................................................................................................................................................................................................................................................................................................................................................................................+.......................................................+.................................................................................................................................................................................................................................................................................+..............................................................................................................................................................................................................+....................................................+..................................................................................................................................................................................................................................................................................................................................+......................................................................................................................................................................................................................................+...................................................................................................................................................................................+........................................................................+.......................................................................................................................................+...................................................+..............................+......................................................+.........................................................................+..............................+..............................+......................................................+..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................++*++*++*
real 27m30.612s
user 26m29.741s
sys 0m16.221s
+ for b in 4096 3072 2048 1024 512
++ mktemp -d
+ openssl dhparam -out /var/folders/c2/k37yy5v51qzd5_rfrwd_sd7r0000gn/T/tmp.VZ7cptiF/dhp 3072
Generating DH parameters, 3072 bit long safe prime, generator 2
This is going to take a long time
..............................................+........................................................................................................................................................................................................................................................................................................................+...................................................................................................................................+....................................................................................................................+.+...........................................................................................................................................................................+............+.................................................................................................................................+.............................................+..........................................................................................................................................................................+........................................................+...................................+........................................................................................................................................................................................................................................+............................................................................................................+..................+........................................................................................................................................................................................+.......................................................................................+.......................................................+.........................................................................................................................................+.......................................................................................................................................................................................................+.........+..........+...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................+........................................................................................................................+..............................................................+..............................................................................................................................................................................................................................................................................................................+...................+....................................................................................................................................................................................+................................................+.................................................................+............................................................................................+...................+.....................................................................................................................................+................................................................+........................................................+......................................................+.....................................................................................+......................................................................+..............................................................................................................................................................................................................................................................................................................................................................................................+...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................+............................+..+.......................................................................................................................................................................................................................................+................................................................................................................................+...............................................+..........................................................................................................................................................................................................+.............................................................................................................................................................................................................................................................................+...........................................................................................................................................................................................................................................................................................................................................................................................+.............................................+...........................................................................................................................................................+.........+.........................................................................................................................................................................+.....................+............................................................................................................................................................................+.................................+..................................................+....................................................................................................+................................................+............................................................................................................................................................................................................................................................................+..............................................................................................................................................................................................+..............................................................................................................................................................................................+.............................................................................................................................................................................................................................................................................................................................................................+.....................................+............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................+......................................................................................................................................+..........+....................................................................................................+......................................................................................................................................................................+.+.........................................................................................................................................................................................................................+.........................................................................................................................................................................+.......................................................................................................................................+...............................................................+......................+...................................................................+.........................................+.....................+..............................................+.....................................................+..................................................................................................+.....................................................................................+........................................+............................................................................................................................................................+..............+........................................................................................................................+...................................................................................................................................................+.+.........................................................................................................................................+...........................................................................................................................................................................................................................................+....................................................................................................................+..............................................................................................................................................................................+.............................................+...........................................................................................................................................................................................................................................+......................+.....................................................................................................................+...................................................................................+........+.............................................................................................................................................................................................................................................+...............................................................................................................................................................+...................................+.............................+..........................................................................................................................................................................................................................................................................+...................................................................................................................................................................................................+........................................................................................................................................................................................................+.........................................................+..............................................................................................................................................................................................................................+.................................................................................................+...........................................................................................................................................................................................+...................................................................................................................................................................................................................................................................................+............................................................................................................+.............................................................................................................................................................................................+..........................................................................................................................................................................+..........................................................................................................................................................+....+..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................+.....................................................+..................+................................................................................................................................................................................................................+................................................................................................................................................................+.......................................................................+...........................................................................................................................................................................................................+........................+.......................................................................................................................................+..........................................................................................+.....................+....................................................................................+...........................................................................................................+......................................................................................................................................................................+............................................................................................+..............................................................................................................................................................................................................+.....................................................................................................................................................................................................................................................................................................................................+..........................................................+................................................................................................+...................................................................................+...............................................................................................................................+.................................................................................................................................................+....................................................+..................++*++*++*++*
real 4m57.308s
user 4m51.402s
sys 0m2.457s
+ for b in 4096 3072 2048 1024 512
++ mktemp -d
+ openssl dhparam -out /var/folders/c2/k37yy5v51qzd5_rfrwd_sd7r0000gn/T/tmp.oMzosBgi/dhp 2048
Generating DH parameters, 2048 bit long safe prime, generator 2
This is going to take a long time
......................................................................................+...............................................................+.........................................................................................................+.............................................................+.....................................................................................................................................................................................................................................................................+....................................+..................................................................................................................................................................................+................+.......+.................................................................................................................................................+.....................+................................................................................+................................................+.......................................................................................................................................................................................................................................................................................+.........................................................................................................................+....+..................................................................................................+.................................................................+.......................................................................................................................................................................+.....................+.......................................+.....................................................................+......+........................................................................................................................................................................................................................................................+..............................................................................................+...................................................................................................+.......+............................+.............................................................................................................................................................+..........+..............................................................................................................................+........................................................................+....................+.....+..............+...........................................................+................................+......................................................................................................................................................................................................................................................+........+.....................................................................................................+..................................................................+......................................+.....................+..................................................................................................+.........................................................................................+.............................................+..........+...............................................................................................+........................................................+.............................+.............++*++*++*++*
real 0m24.250s
user 0m23.922s
sys 0m0.159s
+ for b in 4096 3072 2048 1024 512
++ mktemp -d
+ openssl dhparam -out /var/folders/c2/k37yy5v51qzd5_rfrwd_sd7r0000gn/T/tmp.ZCFRf7tE/dhp 1024
Generating DH parameters, 1024 bit long safe prime, generator 2
This is going to take a long time
..........................................................................................................+................................+....................................................+.+..................................................................+........................+.......................................................................................+.......................+.............................................................................+....................................................................................+.......................................................................+.................................................................+........+.....+......+..+................................................................+.............................................+...+.........................+..........+..................................+.....................+.........................................+.............................................................+......................................+..........+................+........................................+............................................................................................................................................................+...............................................................+..............................................+.......................................................................+...+..............+..................................+.................................................................+................................................................................................................................................................................................................................................+....................................+................+...............................................................+....+.......................................................................+.........+............................................................+................+.................................................................+.......................+.............+......+.....................................+............+..............................................................................................................+...............................+.....+............+..............................................+............................................+..................+..........+..........+..................................................................................................................................................................................................+................+......+...................................................+...........................+........+........................+............+...........................+.....................+.............................................................................+........................................................+....................................................+.........+.+...........................+.....................+...........+..........................................+...........................+.............................................................+.........................++*++*++*++*++*
real 0m4.871s
user 0m4.715s
sys 0m0.078s
+ for b in 4096 3072 2048 1024 512
++ mktemp -d
+ openssl dhparam -out /var/folders/c2/k37yy5v51qzd5_rfrwd_sd7r0000gn/T/tmp.fQNTVlIw/dhp 512
Generating DH parameters, 512 bit long safe prime, generator 2
This is going to take a long time
........+....+...+....+................+..............................................................+........+...........+..........+..........................+......+..............+.......+..................+..........+..........................+.......++*++*++*++*++*
real 0m0.132s
user 0m0.115s
sys 0m0.010s
bash-3.2$
from icinga2.
Things to also consider
As generating DH parameters is extremely time consuming, an application should not generate the parameters on the fly. DH parameters can be reused, as the actual key is newly generated during the negotiation.
Typically applications should use well known DH parameters that have built-in support in OpenSSL. The macros SSL_CTX_set_dh_auto() and SSL_set_dh_auto() configure OpenSSL to use the default built-in DH parameters for the SSL_CTX and SSL objects respectively. Passing a value of 1 in the onoff parameter switches the feature on, and passing a value of 0 switches it off. The default setting is off.
– https://www.openssl.org/docs/man3.1/man3/SSL_CTX_set_dh_auto.html
from icinga2.
Oh! They even have pre-computed 8k params: https://github.com/openssl/openssl/blob/986c48c4eb26861f25bc68ea252d8f2aad592735/ssl/t1_lib.c#L3370-L3402
from icinga2.
Typically applications should use well known DH parameters that have built-in support in OpenSSL. The macros SSL_CTX_set_dh_auto() and SSL_set_dh_auto() configure OpenSSL to use the default built-in DH parameters for the SSL_CTX and SSL objects respectively.
Which is exactly what we do right now (at least if the OpenSSL version supports it):
icinga2/lib/base/tlsutility.cpp
Line 112 in 420db15
Also, keep in mind that, our default cipher string prefers ECDHE over DHE, so whatever we would do wouldn't even affect the majority of connections (if the client supports ECDHE, it will be used):
icinga2/lib/base/tlsutility.hpp
Line 31 in 420db15
from icinga2.
Related Issues (20)
- cluster-zone check reports mysterious zone lag values (at least for command_endpoint agents) HOT 2
- Release Version v2.14.1 HOT 2
- Release Version v2.13.9
- Handle signals gracefully (safely) HOT 1
- null value in column "downtime_end" of relation "sla_history_downtime" violates not-null constraint HOT 11
- High InfluxDB disk usage after upgrading to 2.14.0 HOT 7
- icinga2 may be removed from Debian armel, mips64el, ppc64el, and riscv64 HOT 8
- On Windows use SChannel, not OpenSSL, for TLS connections
- Event Stream API: Dysfunctional "queue" Parameter
- Icinga 2 Ubuntu Installation Guide is broken HOT 5
- Cannot install icinga2 at Fedora39 HOT 4
- Release Version v2.14.2 HOT 2
- packages.icinga.com is down HOT 1
- ssl_cert: Allow forcing IPv4 or IPv6 check HOT 3
- Certain combinations of check periods and check intervals prevent service status updates.
- JsonRpcConnection#Send*() queues messages in memory even after #Disconnect() HOT 2
- `HttpServerConnection` performs TLS shutdown without a timeout
- Re-notification of OK does not work HOT 3
- Re-think CpuBoundWork implementation and usage HOT 1
- Checks executed twice and no recovery notifications are sent
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from icinga2.