  In this paper, we propose to use a twisted dihedral group algebra for
public-key cryptography. For this, we introduce a new $2$-cocycle
$\alpha_{\lambda}$ to twist the dihedral group algebra. Using the ambient space
$\mathbb{F}^{\alpha_{\lambda}} D_{2n}$, we then introduce a key exchange
protocol and present an analysis of its security. Moreover, we explore the
properties of the resulting twisted algebra
$\mathbb{F}^{\alpha_{\lambda}}D_{2n}$, exploiting them to enhance our key
exchange protocol. We also introduce a probabilistic public-key scheme derived
from our key-exchange protocol and obtain a key encapsulation mechanism (KEM)
by applying a well-known generic transformation to our public-key scheme.
Finally, we present a proof-of-concept implementation of the resulting key
encapsulation mechanism.
