In this paper, we study the problem of remote state estimation, in the presence of a passive eavesdropper. An authorized user estimates the state of an unstable linear plant, based on the packets received from a sensor, while the packets may also be intercepted by the eavesdropper. Our goal is to design a coding scheme at the sensor, which encodes the state information, in order to impair the eavesdropper's estimation performance, while enabling the user to successfully decode the sent messages. We introduce a novel class of codes, termed State-Secrecy Codes, which use acknowledgment signals from the user and apply linear time-varying transformations to the current and previously received states. By exploiting the properties of the system's process noise, the channel physical model and the dynamics, these codes manage to be fast, efficient and, thus, suitable for real-time dynamical systems. We prove that under minimal conditions, State-Secrecy Codes achieve perfect secrecy, namely the eavesdropper's estimation error grows unbounded almost surely, while the user's estimation performance is optimal. These conditions only require that at least once, the user receives the corresponding packet while the eavesdropper fails to intercept it. Even one occurrence of this event renders the eavesdropper's error unbounded with asymptotically optimal rate of increase. State-Secrecy Codes are provided and studied for two cases, i) when direct state measurements are available, and ii) when we only have output measurements. The theoretical results are illustrated in simulations.the definition (7) of P k and equation (35), we have P k = Cov {x k |J k (s 0:k )} in C. There exist two cases: Case I: s k = 0. In this case, by the definition (33), we have J k (s 0:k ) = J k (s 0:k−1 ). Therefore:where the third equality follows from (35). Case II: s k = 1. Here, by (35):where z k (s 0:k ) is defined in (33). Since all variables are Gaussian, we can compute the posterior estimation error using the Schur complement formula applied to the covariance matrix of x k and z k (s 0:k ) given J k (s 0:k−1 ) (see [28]). By (35), in C we haveHence, by the Schur's complement formula, we have P k = Σ xx − Σ xz (Σ zz ) † Σ zx in C, when s k = 1.We can describe both cases with one equation:since s k = γ k in C. But this holds for any event C = {g 0:k = s 0:k }. Thus, the result holds everywhere, since the events {g 0:k = s}, s ∈ {0, 1} 2k+1 are a partition of the probability space.