Bluetooth data with security

Just go a hold of two SparkFun Pro nRF52840 Mini which is what I’m trying to use to send data between a system controlling some tanks I have at the farm and the house. THe thing is, these tanks are pretty important and I’m worried about security, so reading up on it I found a few resources on it including this [Bluetooth security primer.

I’m new to bluetooth but It looks like there’s a lot of weaknesses and I need to enable the highest security mode. I’m planning on adding a display so that should help, but as far as enabling everything and making it secure I’m not sure.

Does anyone know how to do this in Arduino ideally? I’d do C but that’s a bit more difficult](Bluetooth Security Primer - Classic + BLE - Thyrasec)

I assume you will use ArduinoBLE. In the later revision, they have been included encryption. I have not tried it yet, but there is an example EncryptedBatteryMonitor.ino that you can look at.

If not, I would store the data to send in a buffer, encrypt that buffer with a key, send it and decrypt the buffer on the other side.

Thank you. That looks like a good starting point