\input zb-basic \input zb-ioport \iteman{io-port 06044118} \itemau{Maghrebi, Houssem; Prouff, Emmanuel; Guilley, Sylvain; Danger, Jean-Luc} \itemti{A first-order leak-free masking countermeasure.} \itemso{Dunkelman, Orr (ed.), Topics in cryptology -- CT-RSA 2012. The cryptographers' track at the RSA conference 2012, San Francisco, CA, USA, February 27--March 2, 2012. Proceedings. Berlin: Springer (ISBN 978-3-642-27953-9/pbk). Lecture Notes in Computer Science 7178, 156-170 (2012).} \itemab Summary: One protection of cryptographic implementations against side-channel attacks is the masking of the sensitive variables. In this article, we present a first-order masking that does not leak information when the registers change values according to some specific (and realistic) rules. This countermeasure applies to all devices that leak a function of the distance between consecutive values of internal variables. In particular, we illustrate its practicality on both hardware and software implementations. Moreover, we introduce a framework to evaluate the soundness of the new first-order masking when the leakage slightly deviates from the rules involved to design the countermeasure. It reveals that the countermeasure remains more efficient than the state-of-the-art first-order masking if the deviation from the ideal model is equal to a few tens of percents, and that it is as good as a first-order Boolean masking even if the deviation is 50\%. \itemrv{~} \itemcc{} \itemut{first-order masking; leakage in distance; leakage-free countermeasure} \itemli{doi:10.1007/978-3-642-27954-6\_10} \end