Bug #13526


Invalid message from WireGuard about a wrong public key for peer

Added by Yann Papouin 2 months ago. Updated about 2 months ago.

Not a Bug
Target version:
Start date:
Due date:
% Done:


Estimated time:
Plus Target Version:
Affected Version:
Affected Plus Version:
Affected Architecture:


Making an experimentation with Wireguard Package on pfSense 2.6
After using Wireguard android apps to generate a peer private/public keys, I'm not able to save the public key in the GUI using the « Save Peer » button.

The public key (​XtyQ7Qb3T9s9l5WtMRpf26+J/uNUElzOgBPZma4Hahs=) is not a valid WireGuard public key.


Actions #1

Updated by Jim Pingle 2 months ago

  • Project changed from pfSense to pfSense Packages
  • Category changed from WireGuard to WireGuard
  • Release Notes deleted (Default)
Actions #2

Updated by Chris W 2 months ago

  • Status changed from New to Feedback
Actions #3

Updated by Chris W 2 months ago

Can you please detail the steps you took which resulted in the key not being accepted?

I'm unable to reproduce this on 2.6 using Wireguard for Android v1.0.20220516 on Android 13. The public key provided by the app is accepted when I click Save Peer, as is the public key provided in the screenshot above. For reference, the app offered me this key:


PfSense also accepted the key with white spaces preceeding and trailing the key in the form field. The only way I could reproduce the error shown above was to remove a single character from the generated keys.

Actions #4

Updated by Yann Papouin 2 months ago

To transfert the key from the Wireguard Android device to my PC, I made a copy using the builtin touch-to-copy to clipboard and next I pasted it to a new draft on the Gmail android version.
Using the syncing function, I get back the draft from GMail on my PC using the web version.

I kept the draft e-mail so I was able to analyse its content using a vscode extension.
And indeed there is a space at the end of the string but this character is invisible (ZERO WIDTH SPACE 0x200b).

I don't know when and why this character was added.

Maybe the trimming function should take care of all these unicode space characters.
Or another way would be to only keep valid characters.

Actions #5

Updated by Christian McDonald 2 months ago

  • Assignee set to Christian McDonald
Actions #6

Updated by Kris Phillips about 2 months ago

  • Status changed from Feedback to Not a Bug

Marking as Not a Bug as it seems to have been a copy/paste error in Android. Thank you for following up!


Also available in: Atom PDF