开发者

SSL: If you use 2048 bit RSA key will the symmetric key that is negotiated also be larger

开发者 https://www.devze.com 2023-04-05 04:31 出处:网络
I am using openssl. I need to use a bigger RSA key (2048 ). Is there any relation between the size of the RSA key and the size of the symmetric key (say DES). SSL doesn\'t ap开发者_如何学运维pear to p

I am using openssl. I need to use a bigger RSA key (2048 ). Is there any relation between the size of the RSA key and the size of the symmetric key (say DES). SSL doesn't ap开发者_如何学运维pear to put any restriction


Size of symmetric key depends on the symmetric algorithm and it's not directly related to asymmetric key size. Eg. no matter what length of used RSA key is, DES key will remain at 56 bits.


In SSL, that which is encrypted with RSA is the pre-master secret, a random string generated by the client which always has length 48 bytes. Then, the pre-master secret is derived (with the key derivation function that is known as "PRF" in the SSL/TLS standard) into exactly as many bits are required for whatever symmetric encryption algorithms will be used. Thus, no direct relation between the RSA key size, and the symmetric encryption key size.

A 48-byte pre-master can be encrypted with any RSA key of length 472 bits or more, so no problem here.


No, there's no restriction - you can select both the session key and the RSA key separately depending on what level of protection you need. Of course there will be some "recommended" relation between keys lengths, but the choice is up to you. That relation might change if at some point a minor weakness is found in RSA and you decide you need a considerably longer key - that weakness will likely not affect the symmetric algorithm and so the keylength for the latter may be kept unchanged.


The asymmetric key is used to send the symmetric by encrypting it. Thus they are independent operations and independent of each other. As a result an increase in the bit size of one will not impact the size of the other.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号