When using SSL/TLS, a server has the option of presenting a certificate containing either an RSA key or a DSA key. The use of DSA keys is more secure in SSL/TLS, because DSA permits the use of Diffie-Hellman key negotiation and its corresponding Perfect Forward Secrecy, while RSA does not (in theory, there is no reason why an RSA key can't be used to sign an ephemeral DH public key, and indeed PGP does this, but SSL/TLS does not support this mode of operation). Thus, DSA keys are potentially more secure when used with SSL/TLS than RSA keys.
However, ZNC does not currently permit the use of DSA server keys (although the server will start up fine, any attempt to connect to it will fail). This is because, in order to use ephemeral DH, the SSL context needs to have DH parameters attached. The parameters are slow to generate (primality testing) but can be used forever; individual DH keys are generated very quickly from the parameters and are used for one connection and discarded, thus achieving Perfect Forward Secrecy.
Traditionally, DH parameters would be stored in a file for permanent use. In fact, they can be stored in the same PEM file with the key and certificate. I will attach (if that's possible on Github) a patch that inserts the few lines of code necessary to load DH parameters from the PEM file. If no DH parameters are present, the new code fails silently; thus, there is no effect on existing RSA-based servers which don't have DH parameters at all.
When using SSL/TLS, a server has the option of presenting a certificate containing either an RSA key or a DSA key. The use of DSA keys is more secure in SSL/TLS, because DSA permits the use of Diffie-Hellman key negotiation and its corresponding Perfect Forward Secrecy, while RSA does not (in theory, there is no reason why an RSA key can't be used to sign an ephemeral DH public key, and indeed PGP does this, but SSL/TLS does not support this mode of operation). Thus, DSA keys are potentially more secure when used with SSL/TLS than RSA keys.
However, ZNC does not currently permit the use of DSA server keys (although the server will start up fine, any attempt to connect to it will fail). This is because, in order to use ephemeral DH, the SSL context needs to have DH parameters attached. The parameters are slow to generate (primality testing) but can be used forever; individual DH keys are generated very quickly from the parameters and are used for one connection and discarded, thus achieving Perfect Forward Secrecy.
Traditionally, DH parameters would be stored in a file for permanent use. In fact, they can be stored in the same PEM file with the key and certificate. I will attach (if that's possible on Github) a patch that inserts the few lines of code necessary to load DH parameters from the PEM file. If no DH parameters are present, the new code fails silently; thus, there is no effect on existing RSA-based servers which don't have DH parameters at all.
<!-- github-sync-id:904355 -->
Apparently there's no way to attach a file to a Github issue. I'll paste the patch inline here. If you'd prefer it provided by some other mechanism, tell me and I'll be happy to do that.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
When using SSL/TLS, a server has the option of presenting a certificate containing either an RSA key or a DSA key. The use of DSA keys is more secure in SSL/TLS, because DSA permits the use of Diffie-Hellman key negotiation and its corresponding Perfect Forward Secrecy, while RSA does not (in theory, there is no reason why an RSA key can't be used to sign an ephemeral DH public key, and indeed PGP does this, but SSL/TLS does not support this mode of operation). Thus, DSA keys are potentially more secure when used with SSL/TLS than RSA keys.
However, ZNC does not currently permit the use of DSA server keys (although the server will start up fine, any attempt to connect to it will fail). This is because, in order to use ephemeral DH, the SSL context needs to have DH parameters attached. The parameters are slow to generate (primality testing) but can be used forever; individual DH keys are generated very quickly from the parameters and are used for one connection and discarded, thus achieving Perfect Forward Secrecy.
Traditionally, DH parameters would be stored in a file for permanent use. In fact, they can be stored in the same PEM file with the key and certificate. I will attach (if that's possible on Github) a patch that inserts the few lines of code necessary to load DH parameters from the PEM file. If no DH parameters are present, the new code fails silently; thus, there is no effect on existing RSA-based servers which don't have DH parameters at all.
Apparently there's no way to attach a file to a Github issue. I'll paste the patch inline here. If you'd prefer it provided by some other mechanism, tell me and I'll be happy to do that.
Replaced by pull request #46.