  These lecture notes have been written for courses given at \'Ecole normale
sup\'erieure de Lyon and summer school 2022 in post-quantum cryptography that
took place in the university of Budapest. Our objective is to give a general
introduction to the foundations of code-based cryptography which is currently
known to be secure even against quantum adversaries. In particular we focus our
attention to the decoding problem whose hardness is at the ground of the
security of many cryptographic primitives, the most prominent being McEliece
and Alekhnovich' encryption schemes.
