I was watching this FHE video and it define Regev encryption scheme as fallow :
kyegen:
- sk : choose $t = (1,s)^t \in \mathbb{Z}_q^{n+1}$
- pk = $A \in \mathbb{Z}_q^{m*(n+1)}$ random except $[A * t]_q$ small
Enc: for random $r \in \{0,1\}^m $ output and $\mu \in\{0,1\}$
- $c \leftarrow (\mu,0,...,0).\frac{q}{2} + r.A$
Dec : compute $$\langle c,t\rangle = \mu.\frac{q}{2} + r.A.t = \mu.\frac{q}{2} + \; small \; (mod \; q)$$
- Decrypt $\mu$ as MSB$([\langle c,t \rangle]_q)$
But i can not understand how decryption works? what i think is for example for $q = 8$ if $[\langle c,t \rangle]_q \in [2,6)$ message is 1 and if $[\langle c,t \rangle]_q \in [6,8) \cup [0,2)$ message is 0 (if absolute value of small in $\langle c,t\rangle$ be less thatn $q/4$). I cant understand how the message would be MSB$([\langle c,t \rangle]_q)$ ? for example if we use 3 bits for each number MSb of both 0 and 3 would be 0.
Edit
responding to @kelalaka answer. beside $q$ being odd which is important but not very much what made me confused at first place was this section of Regev's paper. I think what you said is true when "small" bounded like $0<= small < q/2$. for example for $q = 7$ we have something like $$000\\001\\010\\\\011\\---------\\100\\101\\110$$ and what i said when $-q/4<= small < q/4$ and depends on error distribution you choose at first place. but still not sure.
Edit 2 : actually it was kinda a silly question. for future reference if somebody(with low probability) came across this question. Homomorphic Encryption is a good paper from SHai Halevi, the guy in the video. and at secction 2.1 Notations and Basic Definitions you can find definition of $[\;\;]_q$ and much more.
Hence we see that 2a decryption error occurs only if the sum of the error terms over all S is greater than q/4
. Updated the answer, too. $\endgroup$