libdvbcsa is a free and portable implementation of the DVB Common Scrambling algorithm with decryption and encryption capabilities. It comes in two flavors: a classical single packet implementation and a faster parallel bitslice implementation.