implemented AES encryption and uplink policy

also fixed trailer length (corresponding to server parser fix)