• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

How safe to change default SHA1 to other encryption algorithm?

Scheduled Pinned Locked Moved OpenVPN
9 Posts 6 Posters 9.5k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E
    emammadov
    last edited by Feb 23, 2017, 12:20 PM

    Hello,

    When setupping OpenVPN server, I encounter Auth Digest Algorithm, which default encryption algorithm is SHA1 (160-bit). I would like to know, is it safe to change SHA1 to another algorithm like RSA-SHA256 (256-bit) or leave it as it is?

    Elvin

    1 Reply Last reply Reply Quote 0
    • K
      kpa
      last edited by Feb 23, 2017, 2:03 PM

      SHA1 is potentially already unsafe and you probably should be using SHA256 instead:

      https://blog.qualys.com/ssllabs/2014/09/09/sha1-deprecation-what-you-need-to-know

      1 Reply Last reply Reply Quote 0
      • V
        VAMike
        last edited by Feb 23, 2017, 4:39 PM

        the catch is that things don't work properly if both ends aren't configured to use the same algorithm–which can be a pain depending on how many clients and servers are involved. my own inclination would be to skip the change to sha256 and get everyone on 2.4 and AES-128-GCM instead, if possible (no SHA needed).

        1 Reply Last reply Reply Quote 0
        • J
          jimp Rebel Alliance Developer Netgate
          last edited by Feb 23, 2017, 7:48 PM

          It's completely safe so long as both sides support the same authentication digest algorithm (it's not an encryption algorithm). Use whatever you want so long as it matches on the server and all clients. If it's an RA setup you would have to export new configurations or manually edit client configurations. For a new RA setup, the client will get it when exported.

          VAMike: AES-GCM is preferable but requires OpenVPN 2.4 which isn't available on pfSense 2.3.3. It still uses an auth digest algo for the control channel, so it's important to pick a strong one like SHA256 or better even then.

          Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

          Need help fast? Netgate Global Support!

          Do not Chat/PM for help!

          1 Reply Last reply Reply Quote 0
          • E
            emammadov
            last edited by Feb 24, 2017, 6:49 AM

            Thank you very much for your replies. Now I know it is better to choose another one than SHA1. But I see that there are two types of SHA256 here: RSA-SHA256 and SHA256. Is RSA-SHA256 more stronger than SHA256? And one more question about Hardware Crypto. Do I have to choose one of the options in combobox or leave it as "No Hardware Crypto Acceleration?

            Elvin

            1 Reply Last reply Reply Quote 0
            • J
              johnpoz LAYER 8 Global Moderator
              last edited by Feb 24, 2017, 12:24 PM

              I think that is just quirk in how openvpn lists stuff

              http://security.stackexchange.com/questions/91908/using-rsa-sha-as-instead-hmac-in-openvpn

              In other words, you see some "alternate names" with some RSA or ECDSA but that's just a consequence of how OpenSSL names things, and if you use these names you just obtain the underlying hash function (to be used in HMAC) and nothing more. Thus, –auth SHA1 and --auth RSA-SHA1 are completely equivalent.

              An intelligent man is sometimes forced to be drunk to spend time with his fools
              If you get confused: Listen to the Music Play
              Please don't Chat/PM me for help, unless mod related
              SG-4860 24.11 | Lab VMs 2.7.2, 24.11

              1 Reply Last reply Reply Quote 0
              • V
                VAMike
                last edited by Feb 24, 2017, 1:27 PM

                @jimp:

                VAMike: AES-GCM is preferable but requires OpenVPN 2.4 which isn't available on pfSense 2.3.3. It still uses an auth digest algo for the control channel, so it's important to pick a strong one like SHA256 or better even then.

                I'm aware of that. My point was that if it takes a bunch of work to change client & server configurations, it makes sense to just put it off until it's possible to upgrade to 2.4 and switch to GCM. There is no real pressing need to change anything right now. If starting from scratch using SHA256 is fine.

                1 Reply Last reply Reply Quote 0
                • K
                  kpa
                  last edited by Feb 24, 2017, 3:37 PM

                  @johnpoz:

                  I think that is just quirk in how openvpn lists stuff

                  http://security.stackexchange.com/questions/91908/using-rsa-sha-as-instead-hmac-in-openvpn

                  In other words, you see some "alternate names" with some RSA or ECDSA but that's just a consequence of how OpenSSL names things, and if you use these names you just obtain the underlying hash function (to be used in HMAC) and nothing more. Thus, –auth SHA1 and --auth RSA-SHA1 are completely equivalent.

                  I don't have any source material to cite now but as far as I remember SHA1 (or any such hash function) alone isn't a MAC, there has to be an encryption involved to make it a MAC that can resist the usual attacks that are used against MACs. What OpenVPN does is just to spell out that in the RSA-SHA* stuff but also keeps the older names for compatibility.

                  1 Reply Last reply Reply Quote 0
                  • P
                    Pippin
                    last edited by Feb 24, 2017, 4:11 PM

                    @emammadov:

                    But I see that there are two types of SHA256 here: RSA-SHA256 and SHA256.

                    They are the same.
                    http://security.stackexchange.com/questions/91908/using-rsa-sha-as-instead-hmac-in-openvpn

                    I gloomily came to the ironic conclusion that if you take a highly intelligent person and give them the best possible, elite education, then you will most likely wind up with an academic who is completely impervious to reality.
                    Halton Arp

                    1 Reply Last reply Reply Quote 0
                    9 out of 9
                    • First post
                      9/9
                      Last post
                    Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                      This community forum collects and processes your personal information.
                      consent.not_received