Use this option if you can securely distribute the AES key to each
client.
It is somewhat similar to SSL mode with a
self-signed certificate.
Xpra’s AES encryption layer uses the python cryptography library to encrypt the network packets with AES(Advanced Encryption Standard) CBC mode (Cipher-block chaining).
The encryption key can be stored in a keyfile or specified using the
keydata
socket option. If neither is present and an
authentication module was used, the password will be used as key
data.
The key data is stretched using PBKDF2(Password-Based Key
Derivation Function 2).
The salts used are generated using Python’s uuid.uuid4()
generate a key:
uuidgen > ./key.txt
start a server:
xpra start --start=xterm \
--bind-tcp=0.0.0.0:10000,encryption=AES,keyfile=key.txt
xpra attach "tcp://localhost:10000/?encryption=AES&keyfile=./key.txt"
Prior to version 4.1, the encryption is configured globally, for all TCP sockets, using the following syntax:
xpra start --start=xterm \
--bind-tcp=0.0.0.0:10000 \
--tcp-encryption=AES --tcp-encryption-keyfile=key.txt
xpra attach tcp://$HOST:10000 --tcp-encryption=AES --tcp-encryption-keyfile=./key.txt
With newer versions, instead of using the keyfile
option, it is also possible to inline the keydata
value in
the bind and attach strings: * keydata=0x...
for
hexadecimal encoded keys * keydata=base64:...
for base64
encoded keys * keydata=...
for plain text keys
To verify that your client connection is using AES, look for
cipher=AES
:
xpra info | grep cipher=
To enable debugging, use the -d crypto
debug logging option.