hello, tell me what are the ways to protect the payload from tampering in point-to-point mode
Welcome to RAK forum @VahrushevSA
You can probably encrypt your payload. I have no experience yet for encrypted P2P but if you are using Arduino as the controller of RAK811, you can have a look on this Arduino Cryptography Library: Arduino Cryptography Library.
I managed to encrypt the payload on one node and decrypt it on another node.
But it turns out that you still need to take into account the number of received encrypted payloads ?, because an attacker can make a transmitted packet with an encrypted payload and transmit it to my node.
You can do the same principle of frame counter checks. You put a counter that is part of the payload that is also encrypted. This will avoid replay attacks on your P2P setup
Btw, what encryption library did you use?
I used node-red-contrib-crypto-js