  For any given channel $W$ with classical inputs and possibly quantum outputs,
a dual classical-input channel $W^\perp$ can be defined by embedding the
original into a channel $\mathcal N$ with quantum inputs and outputs. Here we
give new uncertainty relations for a general class of entropies that lead to
very close relationships between the original channel and its dual. Moreover,
we show that channel duality can be combined with duality of linear codes,
whereupon the uncertainty relations imply that the performance of a given code
over a given channel is entirely characterized by the performance of the dual
code on the dual channel. This has several applications. In the context of
polar codes, it implies that the rates of polarization to ideal and useless
channels must be identical. Duality also relates the tasks of channel coding
and privacy amplification, implying that the finite blocklength performance of
extractors and codes is precisely linked, and that optimal rate extractors can
be transformed into capacity-achieving codes, and vice versa. Finally, duality
also extends to the EXIT function of any channel and code. Here it implies that
for any channel family, if the EXIT function for a fixed code has a sharp
transition, then it must be such that the rate of the code equals the capacity
at the transition. This may give a different route to proving a code family
achieves capacity by establishing sharp EXIT function transitions.
