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

    ChaCha20-Poly1305 Hardware assist/offload?

    Scheduled Pinned Locked Moved General pfSense Questions
    5 Posts 3 Posters 2.3k 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.
    • keyserK
      keyser Rebel Alliance
      last edited by

      Hi all

      Seeing that FreeBSD 14 is now at the core of pfSense in 23.01, and Wireguards ChaCha20-Poly1305 cipher has been made available for both IPsec and OpenVPN DCO, where are we in terms of hardware acceleration of this stream cipher?

      Is it supported at all at this point?
      If so in which cases - AES-NI, QAT on Intel? SafeXcel on arm?

      I know ChaCha20 is much faster (soft) on the CPU than traditional AES block ciphers, but still, Intel released benchmarks on linux that showed wireguard could see anything from 3 to 10X speed increase using AVX512 and QAT.

      I would really like to switch to Wireguard for my Site 2 Site tunnels, but since I have SG-2100’s in the other end, performance is not on IPsec with SafeXcel hardware offload levels in 22.05. And the CPU i visibly taxed harder during heavy usage that AES128-CGM using SafeXcel.

      Does 23.01 change any of this with FreeBSD14’s kernel support for Wireguard?

      Love the no fuss of using the official appliances :-)

      Dobby_D 1 Reply Last reply Reply Quote 0
      • stephenw10S
        stephenw10 Netgate Administrator
        last edited by

        It doesn't change anything in terms of hardware acceleration. The crypto hardware SafeXcel attaches to cannot accelerate chacha poly.

        Steve

        keyserK 1 Reply Last reply Reply Quote 0
        • keyserK
          keyser Rebel Alliance @stephenw10
          last edited by

          @stephenw10 said in ChaCha20-Poly1305 Hardware assist/offload?:

          It doesn't change anything in terms of hardware acceleration. The crypto hardware SafeXcel attaches to cannot accelerate chacha poly.

          Steve

          Thanks - good to know. How about QAT acceleration on x64? Is that done at this stage (not that it would help me)?

          Love the no fuss of using the official appliances :-)

          1 Reply Last reply Reply Quote 0
          • stephenw10S
            stephenw10 Netgate Administrator
            last edited by

            On amd64? QAT is enabled but I don't believe any of the currently supported hardware will accelerate chacha poly. See: https://man.freebsd.org/cgi/man.cgi?query=qat

            That is coming in gen3 devices from what I can see. Driver support allowing. I don't have anything that supports it to test against yet. 😉

            1 Reply Last reply Reply Quote 0
            • Dobby_D
              Dobby_ @keyser
              last edited by

              @keyser

              Seeing that FreeBSD 14 is now at the core of pfSense
              in 23.01, and Wireguards ChaCha20-Poly1305 cipher
              has been made available for both IPsec and OpenVPN
              DCO, where are we in terms of hardware acceleration
              of this stream cipher?

              It rumours here and there but not really something that
              will be available soon for usage.

              Is it supported at all at this point?

              The new Intel Atom C5000 or P5000 SoC series will be sorted with QAT 2 or QAT 3 as I am informed.

              If so in which cases - AES-NI, QAT on Intel? SafeXcel on > arm?

              The DPDK has something right now "available", that is using the Intel QAT to support the ChaCha-Poly algorithm
              as I know it is the only available source about at this time.

              This patchset adds Chacha20-Poly1305 implementation to Intel QuickAssist Technology pmd.

              I know ChaCha20 is much faster (soft) on the CPU than traditional AES block ciphers, but still, Intel released benchmarks on linux that showed wireguard could see anything from 3 to 10X speed increase using AVX512 and QAT.

              Linux is not FreeBSD, and FreeBSD is the underlying OS for pfSense. They are both "unixoide" OS but nothing more.

              I would really like to switch to Wireguard for my Site 2
              Site tunnels, but since I have SG-2100’s in the other end,

              The ARM architecture is different from the x86_64 and comes also with an own crypto unit, its strong and powerful but not the same as Intel QAT.

              #~. @Dobby

              Turris Omnia - 4 Ports - 2 GB RAM / TurrisOS 7 Release (Btrfs)
              PC Engines APU4D4 - 4 Ports - 4 GB RAM / pfSense CE 2.7.2 Release (ZFS)
              PC Engines APU6B4 - 4 Ports - 4 GB RAM / pfSense+ (Plus) 24.03_1 Release (ZFS)

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.