0

If one connects with a VPN client software to a VPN service provider (like ExpressVPN, NordVPN, etc) which uses OpenVPN, and that service is end-to-end encrypted, and the VPN service provider uses AES-NI – how taxing in terms of compute is typically the encryption taking place on the client device, roughly speaking?

I have considered buying a hardware router (firewall category, without Wi-Fi access point) to route my home network through such an OpenVPN service, and I am trying to understand just how powerful CPU and memory the hardware router needs, to provide unfettered encrypted Internet speeds. Some of the more expensive router models (e.g. using Intel i5–i7 processors) touts being able to handle AES-NI encryption at high speeds, but it is unclear if they are referring to a situation where the router acts as a server to create a custom VPN network for my home – or if they are referring to the situation such as mine where I would connect my home devices to a router, onto a VPN service provider.

In other words: do I really need to concern myself with advanced router compute performance, if I'm not intending on running a custom VPN network?

2
  • 1
    It's not very taxing. Typical home router hardware with OpenWRT works usually fine.
    – dirkt
    Jul 11, 2020 at 18:35
  • 1
    @dirkt Unfortunately this us not really correct - typical home routers running *art can do a passable job, but even decent routers of this type will top out at 40 megabit or so. That said, once you are talking x86 with AES-NI it becomes trivial as the hardware makes light work if the heavy lifting - and you can get away with pretty much any basic x86 system with this for OpenVPN.
    – davidgo
    Jul 12, 2020 at 10:10

1 Answer 1

3

and the VPN service provider uses AES-NI

AES is a cipher, AES-NI is an Intel CPU feature that accelerates this cipher. Don't mix the two up.

Clients cannot tell the difference between a server which uses "hardware" AES through AES-NI and a server which uses "software" AES. In both cases the same algorithm is applied and the data is encrypted in the same way.

I am trying to understand just how powerful CPU and memory the hardware router needs, to provide unfettered encrypted Internet speeds.

It doesn't need a large amount of memory, mostly just CPU. And it depends on whether the CPU has some kind of hardware acceleration for the cipher. The manufacturer's product website should have information about this (such as example), and some of them even publish test results for common configurations.

  • I googled for information about single-board computers, which I guess are similar in power. For example, the RPi 4 can process AES at ~600 Mbps if it does nothing else (it does not have ARM's AES extensions).

  • Routers generally use different kinds of CPUs than desktop computers do, but nevertheless I ran a benchmark on several on my PCs (all of them having various kinds of Intel x64 CPUs): the ones without AES acceleration can encrypt AES-CBC at ~1 Gbps, and the ones with hardware AES (using Intel AES-NI) can do the same at ~6 Gbps.

it is unclear if they are referring to a situation where the router acts as a server to create a custom VPN network for my home – or if they are referring to the situation such as mine where I would connect my home devices to a router, onto a VPN service provider.

There is no real difference between the two. If one end encrypts data, the other end has to decrypt it, and vice versa, but it doesn't matter whether the server or the client is doing one or the other. (Clients do not somehow offload the "heavy work" to the server – doing so would actually completely miss the point of encrypting the data in the first place.)

For AES-GCM or AES-CTR it's approximately the same amount of work both ways. For AES-CBC, as I just found out, decryption can be done in parallel but encryption cannot, so the side sending data has to do more work than the side receiving the data.

In other words: do I really need to concern myself with advanced router compute performance, if I'm not intending on running a custom VPN network?

Yes, you still do. The only measure is how many bytes and/or packets per second you intend to process – it doesn't matter whether you're a server or a client. (Some VPN systems do not even distinguish the two roles at all.)

For example, if you're planning for 50 Mbps through the VPN you really won't need much power at all, but if you're expecting 1 Gbps then some sort of hardware acceleration will be necessary.

Note that AES is used through various operation modes (AES-GCM, AES-CTR, AES-CBC) and not all hardware acceleration features are compatible with every mode, and not all modes are equally possible to accelerate. See for example this Intel AES-NI doc.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .