# Flint 2: OpenVPN AES CPU support missing?

**URL:** <https://forum.gl-inet.com/t/flint-2-openvpn-aes-cpu-support-missing/38127>\
**Category:** Router\
**Created:** [February 2, 2024, 3:27pm UTC](https://forum.gl-inet.com/t/flint-2-openvpn-aes-cpu-support-missing/38127 "2024-02-02T15:27:28Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![ygorsoares](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/y/87869e/32.png) [@ygorsoares](https://forum.gl-inet.com/u/ygorsoares)\
**Post date:** [February 2, 2024, 3:27pm UTC](https://forum.gl-inet.com/t/flint-2-openvpn-aes-cpu-support-missing/38127/1 "2024-02-02T15:27:28Z")

</div>

@alex_zheng

I noticed that openvpn’s performance is well below expectations, on average 80Mbps is the maximum I can get, and this is using AES-128 to alleviate processing.

I verified that the CPU supports AES, but it appears that the Kernel does not have the module enabled. Am I correct about this?

If so, is there a plan to enable them in the kernel?

![IMG-20240202-WA0018](https://forum-static.gl-inet.com/original/2X/c/c50fdf10fb7979677a2b27cad78afae321ccf0ba.jpeg)

![IMG-20240202-WA0019](https://forum-static.gl-inet.com/original/2X/9/9275b41c5b33197a2119c0b58b7f0e6b52f31ac3.jpeg)

Best regards

---

<div class="post-metadata">

**Author:** ![doczenith1](https://forum-assets.gl-inet.com/user_avatar/forum.gl-inet.com/doczenith1/32/4152_2.png) [@doczenith1](https://forum.gl-inet.com/u/doczenith1)\
**Post date:** [February 2, 2024, 7:29pm UTC](https://forum.gl-inet.com/t/flint-2-openvpn-aes-cpu-support-missing/38127/2 "2024-02-02T19:29:19Z")

</div>

At the risk of being off topic I’ll add my findings for my Spitz AX.

When doing the grep I’m getting

```auto
arc4
chacha_neon
crc32_generic
crc32c_generic
des_generic
kernel
md5
poly1305_neon

```

My OpenVPN speeds using AES-128-GCM do hit the advertised speed for the Spitz AX of 150 Mbps. Seeing 150 Mbps does seem like AES acceleration is working.

---

<div class="post-metadata">

**Author:** ![bring.fringe18](https://forum-assets.gl-inet.com/user_avatar/forum.gl-inet.com/bring.fringe18/32/11777_2.png) [@bring.fringe18](https://forum.gl-inet.com/u/bring.fringe18)\
**Post date:** [February 2, 2024, 8:39pm UTC](https://forum.gl-inet.com/t/flint-2-openvpn-aes-cpu-support-missing/38127/3 "2024-02-02T20:39:54Z")

</div>

> [@ygorsoares](#):
>
> I verified that the CPU supports AES, but it appears that the Kernel does not have the module enabled. Am I correct about this?

Correction: you verified you have a generic kernel module loaded to handle AES operations.

These SOCs are similar to ones found mobile phones if not near identical (ARM Cortex A53 in this case). It’s highly doubtful they’d have full AES support like Intel AES-NI. GL doesn’t used the SOCs that supports something like AES-NI on ARM from what I’ve seen. It’s currently the exception rather than norm.

Is there some reason you’re not using WG?

* * *

`cat /etc/openwrt_release`

- [https://openwrt.org/toh/hwdata/gl.inet/gl.inet\_gl-mt6000](https://openwrt.org/toh/hwdata/gl.inet/gl.inet_gl-mt6000)
- [https://openwrt.org/docs/techref/instructionset/aarch64\_cortex-a53](https://openwrt.org/docs/techref/instructionset/aarch64_cortex-a53)

* * *

> **[AES instruction set](https://en.wikipedia.org/wiki/AES_instruction_set)**
>
> An AES (Advanced Encryption Standard) instruction set is a set of instructions that are specifically designed to perform AES encryption and decryption operations efficiently. These instructions are typically found in modern processors and can greatly accelerate AES operations compared to software implementations. An AES instruction set includes instructions for key expansion, encryption, and decryption using various key sizes (128-bit, 192-bit, and 256-bit).
> The instruction set is often implemen...

---

<div class="post-metadata">

**Author:** ![ygorsoares](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/y/87869e/32.png) [@ygorsoares](https://forum.gl-inet.com/u/ygorsoares)\
**Post date:** [February 2, 2024, 8:58pm UTC](https://forum.gl-inet.com/t/flint-2-openvpn-aes-cpu-support-missing/38127/4 "2024-02-02T20:58:36Z")

</div>

Precisely, I believe that the generic module does not bring all the performance of the AES instruction built into the CPU. The intention is to use OpenVPN and not Wireguard due to personal needs for the application.

---

<div class="post-metadata">

**Author:** ![ygorsoares](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/y/87869e/32.png) [@ygorsoares](https://forum.gl-inet.com/u/ygorsoares)\
**Post date:** [February 2, 2024, 9:00pm UTC](https://forum.gl-inet.com/t/flint-2-openvpn-aes-cpu-support-missing/38127/5 "2024-02-02T21:00:10Z")

</div>

So it really is abnormal… a theoretically superior equipment is having lower performance. This just shows that there may be a lack of optimization, whether in the kernel module or in the openvpn version.

---

<div class="post-metadata">

**Author:** ![bring.fringe18](https://forum-assets.gl-inet.com/user_avatar/forum.gl-inet.com/bring.fringe18/32/11777_2.png) [@bring.fringe18](https://forum.gl-inet.com/u/bring.fringe18)\
**Post date:** [February 2, 2024, 9:04pm UTC](https://forum.gl-inet.com/t/flint-2-openvpn-aes-cpu-support-missing/38127/6 "2024-02-02T21:04:34Z")

</div>

> [@ygorsoares](#):
>
> […] AES instruction built into the CPU

There is no AES acceleration in the ARM Cortex A53. You’d have to look @ the Cortex A76 + Cortex A55 SOC fr what I’ve read.

It’s not just a lack of AES-NI style acceleration; OVPN is single threaded. It favors GHz over cores.

* * *

Be aware OVPN is a very well known VPN protocols that can be detected… but I don’t know your threat model.

[https://www.usenix.org/conference/usenixsecurity22/presentation/xue-diwen](https://www.usenix.org/conference/usenixsecurity22/presentation/xue-diwen)

---

<div class="post-metadata">

**Author:** ![bonefire](https://forum-assets.gl-inet.com/user_avatar/forum.gl-inet.com/bonefire/32/14956_2.png) [@bonefire](https://forum.gl-inet.com/u/bonefire)\
**Post date:** [February 2, 2024, 9:23pm UTC](https://forum.gl-inet.com/t/flint-2-openvpn-aes-cpu-support-missing/38127/7 "2024-02-02T21:23:00Z")

</div>

Here is some more information about the SoC:

> **[MT7986A\_Datasheet\_1.15.pdf](https://drive.google.com/file/d/1t_nuPTeoAcFb1dmEe4kJVlLWdHcAA6OB/view)**
>
> Google Drive file.

---

<div class="post-metadata">

**Author:** ![bring.fringe18](https://forum-assets.gl-inet.com/user_avatar/forum.gl-inet.com/bring.fringe18/32/11777_2.png) [@bring.fringe18](https://forum.gl-inet.com/u/bring.fringe18)\
**Post date:** [February 2, 2024, 9:26pm UTC](https://forum.gl-inet.com/t/flint-2-openvpn-aes-cpu-support-missing/38127/8 "2024-02-02T21:26:54Z")

</div>

You don’t happen to have anything kicking around for the MT7986AV (Flint v2 SOC), by chance, do you? I’d like to read the differences should you have them on hand.

---

<div class="post-metadata">

**Author:** ![ygorsoares](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/y/87869e/32.png) [@ygorsoares](https://forum.gl-inet.com/u/ygorsoares)\
**Post date:** [February 2, 2024, 9:30pm UTC](https://forum.gl-inet.com/t/flint-2-openvpn-aes-cpu-support-missing/38127/9 "2024-02-02T21:30:34Z")

</div>

The Cortex-a53 supports AES instructions as can be seen in the first main article I posted and also in the ARM documentation below:

[https://developer.arm.com/documentation/ddi0501/f/introduction/about-the-cortex-a53-processor-cryptography-extension](https://developer.arm.com/documentation/ddi0501/f/introduction/about-the-cortex-a53-processor-cryptography-extension)

Please note that I am only mentioning AES, since AES-NI, if I’m not mistaken, is an Intel proprietary instruction

Possibly it is there… due to some licensing issue, the ARM is not enabled… that could be it!

---

<div class="post-metadata">

**Author:** ![ygorsoares](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/y/87869e/32.png) [@ygorsoares](https://forum.gl-inet.com/u/ygorsoares)\
**Post date:** [February 2, 2024, 9:32pm UTC](https://forum.gl-inet.com/t/flint-2-openvpn-aes-cpu-support-missing/38127/10 "2024-02-02T21:32:52Z")

</div>

BPI-R3 uses another SOC, the MT7986A, while Flint 2 uses the MT7986AV. I believe there are differences between them. They may be small, but I believe the model used in Flit would be newer!

---

<div class="post-metadata">

**Author:** ![bring.fringe18](https://forum-assets.gl-inet.com/user_avatar/forum.gl-inet.com/bring.fringe18/32/11777_2.png) [@bring.fringe18](https://forum.gl-inet.com/u/bring.fringe18)\
**Post date:** [February 2, 2024, 9:35pm UTC](https://forum.gl-inet.com/t/flint-2-openvpn-aes-cpu-support-missing/38127/11 "2024-02-02T21:35:33Z")

</div>

> ## About the Cortex-A53 processor Cryptography Extension
> 
> The Cortex-A53 processor Cryptography Extension supports the ARMv8 Cryptography Extensions. The Cryptography Extensions add new A64, A32, and T32 instructions to Advanced SIMD that accelerate _Advanced Encryption Standard_ (AES) encryption and decryption, and the _Secure Hash Algorithm_ (SHA) functions SHA-1, SHA-224, and SHA-256.
> 
> ### Note
> 
> The optional Cryptography Extension is not included in the base product. ARM supplies the Cryptography Extension **only under** an additional licence to the Cortex-A53 processor and Advanced SIMD and Floating-point support licences.

🢁 Emphaisis mine. This could be the root problem, I speculate. GL would have to chime in on that.

> [@ygorsoares](#):
>
> Please note that I am only mentioning AES, since AES-NI, if I’m not mistaken, is an Intel proprietary instruction

I’m saying “AES-NI style”… so we’re both on the same page (AMD licensed AES-NI too IIRC).

---

<div class="post-metadata">

**Author:** ![bonefire](https://forum-assets.gl-inet.com/user_avatar/forum.gl-inet.com/bonefire/32/14956_2.png) [@bonefire](https://forum.gl-inet.com/u/bonefire)\
**Post date:** [February 2, 2024, 9:35pm UTC](https://forum.gl-inet.com/t/flint-2-openvpn-aes-cpu-support-missing/38127/12 "2024-02-02T21:35:34Z")

</div>

I only found

> **[AX6000\_Datasheet\_V1.pdf](https://asiarf.com/wp-content/uploads/2023/09/AX6000_Datasheet_V1.pdf)**
>
> 271.49 KB

so far.

---

<div class="post-metadata">

**Author:** ![ygorsoares](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/y/87869e/32.png) [@ygorsoares](https://forum.gl-inet.com/u/ygorsoares)\
**Post date:** [February 2, 2024, 9:42pm UTC](https://forum.gl-inet.com/t/flint-2-openvpn-aes-cpu-support-missing/38127/13 "2024-02-02T21:42:40Z")

</div>

Exactly… that’s what I think… I don’t see any other impediment other than not being able to use the AES instruction that is already there…

Best regards

---

<div class="post-metadata">

**Author:** ![bring.fringe18](https://forum-assets.gl-inet.com/user_avatar/forum.gl-inet.com/bring.fringe18/32/11777_2.png) [@bring.fringe18](https://forum.gl-inet.com/u/bring.fringe18)\
**Post date:** [February 2, 2024, 9:43pm UTC](https://forum.gl-inet.com/t/flint-2-openvpn-aes-cpu-support-missing/38127/14 "2024-02-02T21:43:53Z")

</div>

If you get clarification/resolution, pls post. I’d be interested to know, if not future readers.

& to you.

---

<div class="post-metadata">

**Author:** ![blackbox](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/b/c2a13f/32.png) [@blackbox](https://forum.gl-inet.com/u/blackbox)\
**Post date:** [February 3, 2024, 1:30am UTC](https://forum.gl-inet.com/t/flint-2-openvpn-aes-cpu-support-missing/38127/15 "2024-02-03T01:30:46Z")

</div>

> [@ygorsoares](#):
>
> ![IMG-20240202-WA0019](https://forum-static.gl-inet.com/original/2X/9/9275b41c5b33197a2119c0b58b7f0e6b52f31ac3.jpeg)

Use `cat /proc/crypto` instead as it’ll show you what crypto drivers are running. AES should be among them.

You can also verify if openvpn is using devcrypto or afalg for acceleration via `openvpn --show-engines`.

---

<div class="post-metadata">

**Author:** ![ygorsoares](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/y/87869e/32.png) [@ygorsoares](https://forum.gl-inet.com/u/ygorsoares)\
**Post date:** [February 3, 2024, 2:38pm UTC](https://forum.gl-inet.com/t/flint-2-openvpn-aes-cpu-support-missing/38127/16 "2024-02-03T14:38:13Z")

</div>

> [@blackbox](#):
>
> `openvpn --show-engines`.

Maybe not being enabled in OpenVPN could be that

 ![Screenshot_20240203_113651_Termius](https://forum-static.gl-inet.com/original/2X/4/42a7990832f2e55764dc8c2a4bd66b466f610d2f.jpeg)

---

<div class="post-metadata">

**Author:** ![alex\_zheng](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/a/4af34b/32.png) [@alex\_zheng](https://forum.gl-inet.com/u/alex_zheng)\
**Post date:** [February 3, 2024, 3:01pm UTC](https://forum.gl-inet.com/t/flint-2-openvpn-aes-cpu-support-missing/38127/17 "2024-02-03T15:01:35Z")

</div>

Sorry for the late. Our fellow will help you to clarify it. will do it tomorrow. 😀

---

<div class="post-metadata">

**Author:** ![blackbox](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/b/c2a13f/32.png) [@blackbox](https://forum.gl-inet.com/u/blackbox)\
**Post date:** [February 3, 2024, 4:11pm UTC](https://forum.gl-inet.com/t/flint-2-openvpn-aes-cpu-support-missing/38127/18 "2024-02-03T16:11:25Z")

</div>

I’d mentioned this in my original reply, but I edited it out since it could negatively impact crypto performance if your device doesn’t support it.

Install `libopenssl-devcrypto`, reboot and then run `openvpn --show-engines` again.

You could also use `openssl engine -pre DUMP_INFO devcrypto` to verify if hardware acceleration is being used for most ciphers.

---

<div class="post-metadata">

**Author:** ![GreenCat](https://forum-assets.gl-inet.com/user_avatar/forum.gl-inet.com/greencat/32/15322_2.png) [@GreenCat](https://forum.gl-inet.com/u/GreenCat)\
**Post date:** [February 3, 2024, 11:08pm UTC](https://forum.gl-inet.com/t/flint-2-openvpn-aes-cpu-support-missing/38127/19 "2024-02-03T23:08:05Z")

</div>

80mpbs is low?  
I would be super happy with 20mbps.  
what i wonder is why do you guys not use wireguard when u can?

> [@blackbox](#):
>
> it could negatively impact crypto performance if your device doesn’t support it.

im also wondering what does this Crypto thing does on a router! anyone?

---

<div class="post-metadata">

**Author:** ![GreenCat](https://forum-assets.gl-inet.com/user_avatar/forum.gl-inet.com/greencat/32/15322_2.png) [@GreenCat](https://forum.gl-inet.com/u/GreenCat)\
**Post date:** [February 3, 2024, 11:10pm UTC](https://forum.gl-inet.com/t/flint-2-openvpn-aes-cpu-support-missing/38127/20 "2024-02-03T23:10:23Z")

</div>

I thought you’re working for me only! I see you’re here too!!!  
Jk lol

[Next page](https://forum.gl-inet.com/t/flint-2-openvpn-aes-cpu-support-missing/38127.md?page=2)
