Systems and methods providing ciphertext switching for syntax compliant
encryption are described. In one aspect, intermediate ciphertext is
generated from syntax compliant plaintext. Post-processing is applied to
the intermediate ciphertext to determine if there are any illegal symbols
in the intermediate ciphertext. If an illegal symbol is located, the
illegal symbol in the intermediate ciphertext is switched with a
corresponding plaintext symbol. One or more iterations of the
post-processing and switching operations result in syntax compliant
ciphertext.