  Data compression combined with effective encryption is a common requirement
of data storage and transmission. Low cost of these operations is often a high
priority in order to increase transmission speed and reduce power usage. This
requirement is crucial for battery-powered devices with limited resources, such
as autonomous remote sensors or implants. Well-known and popular encryption
techniques are frequently too expensive. This problem is on the increase as
machine-to-machine communication and the Internet of Things are becoming a
reality. Therefore, there is growing demand for finding trade-offs between
security, cost and performance in lightweight cryptography. This article
discusses Asymmetric Numeral Systems -- an innovative approach to entropy
coding which can be used for compression with encryption. It provides
compression ratio comparable with arithmetic coding at similar speed as Huffman
coding, hence, this coding is starting to replace them in new compressors.
Additionally, by perturbing its coding tables, the Asymmetric Numeral System
makes it possible to simultaneously encrypt the encoded message at nearly no
additional cost. The article introduces this approach and analyzes its security
level. The basic application is reducing the number of rounds of some cipher
used on ANS-compressed data, or completely removing additional encryption layer
if reaching a satisfactory protection level.
