A (full-rank) lattice~$L$ is defined as the set of all integer linear
combinations of some linearly independent basis
vectors~$(\mathbf{b}_i)_{i\leq n}$ belonging to some~$\RR^n$. We work with $q$-ary lattices, for some prime $q$.
\begin{definition}\label{de:qary-lattices}
Let~$m \geq n \geq1$, a prime~$q \geq2$, $\mathbf{A}\in\ZZ_q^{n \times m}$ and $\mathbf{u}\in\ZZ_q^n$, define
$\Lambda_q(\mathbf{A}) :=\{\mathbf{e}\in\ZZ^m \mid\exists\mathbf{s}\in\ZZ_q^n ~\text{ s.t. }~\mathbf{A}^T \cdot\mathbf{s}=\mathbf{e}\bmod q \}$ as well as
For any $\mathbf{t}\in\Lambda_q^{\mathbf{u}}(\mathbf{A})$, $\Lambda_q^{\mathbf{u}}(\mathbf{A})=\Lambda_q^{\perp}(\mathbf{A})+\mathbf{t}$ so that $\Lambda_q^{\mathbf{u}}(\mathbf{A})$
is a shift of $\Lambda_q^{\perp}(\mathbf{A})$.
\end{definition}
\noindent For a lattice~$L$, a vector $\mathbf{c}\in\RR^n$ and a real~$\sigma>0$, define the function
\noindent Lemma~\ref{le:TrapGen} is often combined with the sampler from Lemma~\ref{le:GPV}. Micciancio and Peikert~\cite{MiPe12} recently proposed a more efficient
approach for this combined task, which should be preferred in practice but, for the sake of simplicity, we present our schemes using~$\TrapGen$.
We also make use of an algorithm that extends a trapdoor for~$\mathbf{A}\in\ZZ_q^{n \times m}$ to a trapdoor of any~$\mathbf{B}\in\ZZ_q^{n \times m'}$ whose left~$n \times m$
\noindent In our security proofs, analogously to \cite{Boy10,BHJKS15} we also use a technique due to Agrawal, Boneh and Boyen~\cite{ABB1} that implements
an all-but-one trapdoor mechanism (akin to the one of Boneh and Boyen \cite{BB04}) in the lattice setting.
There exists a $\PPT$ algorithm $\SampleR$ that takes as inputs matrices $\mathbf A, \mathbf C \in\ZZ_q^{n \times m}$, a low-norm matrix $\mathbf R \in\ZZ^{m \times m}$,
a short basis $\mathbf{T_C}\in\ZZ^{m \times m}$ of $\Lambda_q^{\perp}(\mathbf{C})$, a vector $\mathbf u \in\ZZ_q^{n}$ and a rational $\sigma$ such that $\sigma\geq\|
\widetilde{\mathbf{T_C}}\|\cdot\Omega(\sqrt{\log n})$, and outputs a short vector $\mathbf{b}\in\ZZ^{2m}$ such that $\left[ \begin{array}{c|c}\mathbf A ~ &~ \mathbf A
\cdot\mathbf R + \mathbf C \end{array}\right]\cdot\mathbf b = \mathbf u \bmod q$ and with distribution statistically close to $D_{L,\sigma}$ where $L$ denotes the shifted
lattice $\Lambda^\mathbf{u}_q \left(\left[\begin{array}{c|c}\mathbf A ~&~ \mathbf A \cdot\mathbf R +\mathbf C \end{array}\right]\right)$.
%$\{ \mathbf x \in \ZZ^{2 m} : \left[ \begin{array}{c|c} \mathbf A ~&~ \mathbf A \cdot \mathbf R + \mathbf C \end{array} \right] \cdot \mathbf x = \mathbf u \bmod q \}$.