Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/3319535.3363223acmconferencesArticle/Chapter ViewAbstractPublication PagesccsConference Proceedingsconference-collections
research-article

GALACTICS: Gaussian Sampling for Lattice-Based Constant- Time Implementation of Cryptographic Signatures, Revisited

Published: 06 November 2019 Publication History
  • Get Citation Alerts
  • Abstract

    In this paper, we propose a constant-time implementation of the BLISS lattice-based signature scheme. BLISS is possibly the most efficient lattice-based signature scheme proposed so far, with a level of performance on par with widely used pre-quantum primitives like ECDSA. It is only one of the few postquantum signatures to have seen real-world deployment, as part of the strongSwan VPN software suite. The outstanding performance of the BLISS signature scheme stems in large part from its reliance on discrete Gaussian distributions, which allow for better parameters and security reductions. However, that advantage has also proved to be its Achilles' heel, as discrete Gaussians pose serious challenges in terms of secure implementations. Implementations of BLISS so far have included secret-dependent branches and memory accesses, both as part of the discrete Gaussian sampling and of the essential rejection sampling step in signature generation. These defects have led to multiple devastating timing attacks, and were a key reason why BLISS was not submitted to the NIST postquantum standardization effort. In fact, almost all of the actual candidates chose to stay away from Gaussians despite their efficiency advantage, due to the serious concerns surrounding implementation security. Moreover, naive countermeasures will often not cut it: we show that a reasonable-looking countermeasure suggested in previous work to protect the BLISS rejection sampling can again be defeated using novel timing attacks, in which the timing information is fed to phase retrieval machine learning algorithm in order to achieve a full key recovery. Fortunately, we also present careful implementation techniques that allow us to describe an implementation of BLISS with complete timing attack protection, achieving the same level of efficiency as the original unprotected code, without resorting on floating point arithmetic or platform-specific optimizations like AVX intrinsics. These techniques, including a new approach to the polynomial approximation of transcendental function, can also be applied to the masking of the BLISS signature scheme, and will hopefully make more efficient and secure implementations of lattice-based cryptography possible going forward.

    Supplementary Material

    WEBM File (p2147-espitau.webm)

    References

    [1]
    Erdem Alkim, Paulo S. L. M. Barreto, Nina Bindel, Patrick Longa, and Jefferson E. Ricardini. 2019. The lattice-based digital signature scheme qTESLA. Cryptology ePrint Archive, Report 2019/085. (2019). https://eprint.iacr.org/2019/085.
    [2]
    Gilles Barthe, Sonia Bela"id, Franc cois Dupressoir, Pierre-Alain Fouque, Benjamin Grégoire, Pierre-Yves Strub, and Rébecca Zucchini. 2016. Strong Non-Interference and Type-Directed Higher-Order Masking. In ACM CCS 2016, Edgar R. Weippl, Stefan Katzenbeisser, Christopher Kruegel, Andrew C. Myers, and Shai Halevi (Eds.). ACM Press, 116--129. https://doi.org/10.1145/2976749.2978427
    [3]
    Gilles Barthe, Sonia Bela"id, Thomas Espitau, Pierre-Alain Fouque, Benjamin Grégoire, Mélissa Rossi, and Mehdi Tibouchi. 2018. Masking the GLP Lattice-Based Signature Scheme at Any Order. In EUROCRYPT 2018, Part II (LNCS ), Jesper Buus Nielsen and Vincent Rijmen (Eds.), Vol. 10821. Springer, Heidelberg, 354--384. https://doi.org/10.1007/978--3--319--78375--8_12
    [4]
    Gilles Barthe, Sonia Belaïd, Thomas Espitau, Pierre-Alain Fouque, Mélissa Rossi, and Mehdi Tibouchi. 2019. GALACTICS: Gaussian Sampling for Lattice-Based Constant-Time Implementation of Cryptographic Signatures, Revisited. Cryptology ePrint Archive, Report 2019/511. (2019). https://eprint.iacr.org/2019/511.
    [5]
    Gilles Barthes, Sonia Belaïd, Thomas Espitau, Mélissa Rossi, and Mehdi Tibouchi. 2019. GALACTICS implementations. (2019). https://github.com/espitau/GALACTICS
    [6]
    Daniel J. Bernstein and VAMPIRE Lab others. 2016. System for Unified Performance Evaluation Related to Cryptographic Operations and Primitives. https://bench.cr.yp.to/supercop.html. (2016).
    [7]
    Jonathan Bootle, Claire Delaplace, Thomas Espitau, Pierre-Alain Fouque, and Mehdi Tibouchi. 2018. LWE Without Modular Reduction and Improved Side-Channel Attacks Against BLISS. In ASIACRYPT 2018, Part I (LNCS ), Thomas Peyrin and Steven Galbraith (Eds.), Vol. 11272. Springer, Heidelberg, 494--524. https://doi.org/10.1007/978--3-030-03326--2_17
    [8]
    Joppe W. Bos. 2014. Constant time modular inversion. Journal of Cryptographic Engineering, Vol. 4, 4 (Nov. 2014), 275--281. https://doi.org/10.1007/s13389-014-0084--8
    [9]
    Nicolas Brisebarre and Sylvain Chevillard. 2018. Efficient polynomial $L^infty$-approximations. 18th IEEE Symposium on Computer Arithmetic (ARITH 18). IEEE, 169--176.
    [10]
    Leon Groot Bruinderink, Andreas Hülsing, Tanja Lange, and Yuval Yarom. 2016. Flush, Gauss, and Reload - A Cache Attack on the BLISS Lattice-Based Signature Scheme. In CHES 2016 (LNCS ), Benedikt Gierlichs and Axel Y. Poschmann (Eds.), Vol. 9813. Springer, Heidelberg, 323--345. https://doi.org/10.1007/978--3--662--53140--2_16
    [11]
    E. J. Candés, X. Li, and M. Soltanolkotabi. 2015. Phase Retrieval via Wirtinger Flow: Theory and Algorithms. IEEE Transactions on Information Theory, Vol. 61, 4 (2015), 1985--2007.
    [12]
    S. Chevillard, M. Joldecs, and C. Lauter. 2010. Sollya: An Environment for the Development of Numerical Codes. In Mathematical Software - ICMS 2010 (Lecture Notes in Computer Science), K. Fukuda, J. van der Hoeven, M. Joswig, and N. Takayama (Eds.), Vol. 6327. Springer, Heidelberg, Germany, 28--31.
    [13]
    Jean-Sébastien Coron, Emmanuel Prouff, Matthieu Rivain, and Thomas Roche. 2014. Higher-Order Side Channel Security and Mask Refreshing. In FSE 2013 (LNCS ), Shiho Moriai (Ed.), Vol. 8424. Springer, Heidelberg, 410--424. https://doi.org/10.1007/978--3--662--43933--3_21
    [14]
    Alexandre Duc, Stefan Dziembowski, and Sebastian Faust. 2014. Unifying Leakage Models: From Probing Attacks to Noisy Leakage. In EUROCRYPT 2014 (LNCS ), Phong Q. Nguyen and Elisabeth Oswald (Eds.), Vol. 8441. Springer, Heidelberg, 423--440. https://doi.org/10.1007/978--3--642--55220--5_24
    [15]
    Léo Ducas. 2014. Accelerating Bliss: the geometry of ternary polynomials. Cryptology ePrint Archive, Report 2014/874. (2014). http://eprint.iacr.org/2014/874.
    [16]
    Léo Ducas, Alain Durmus, Tancrède Lepoint, and Vadim Lyubashevsky. 2013. Lattice Signatures and Bimodal Gaussians. In CRYPTO 2013, Part I (LNCS ), Ran Canetti and Juan A. Garay (Eds.), Vol. 8042. Springer, Heidelberg, 40--56. https://doi.org/10.1007/978--3--642--40041--4_3
    [17]
    Léo Ducas, Steven Galbraith, Thomas Prest, and Yang Yu. 2019. Integral matrix Gram root and lattice Gaussian sampling without floats. Cryptology ePrint Archive, Report 2019/320. (2019). https://eprint.iacr.org/2019/320.
    [18]
    Léo Ducas, Eike Kiltz, Tancrède Lepoint, Vadim Lyubashevsky, Peter Schwabe, Gregor Seiler, and Damien Stehlé. 2018. CRYSTALS-Dilithium: A Lattice-Based Digital Signature Scheme. IACR TCHES, Vol. 2018, 1 (2018), 238--268. https://doi.org/10.13154/tches.v2018.i1.238--268 https://tches.iacr.org/index.php/TCHES/article/view/839.
    [19]
    Lé o Ducas and Tancrè de Lepoint. 2013. BLISS: Bimodal Lattice Signature Schemes. (June 2013). http://bliss.di.ens.fr/bliss-06--13--2013.zip (original implementation).
    [20]
    Léo Ducas and Phong Q. Nguyen. 2012. Faster Gaussian Lattice Sampling Using Lazy Floating-Point Arithmetic. In ASIACRYPT 2012 (LNCS ), Xiaoyun Wang and Kazue Sako (Eds.), Vol. 7658. Springer, Heidelberg, 415--432. https://doi.org/10.1007/978--3--642--34961--4_26
    [21]
    Thomas Espitau, Pierre-Alain Fouque, Beno^i t Gé rard, and Mehdi Tibouchi. 2018. Loop-Abort Faults on Lattice-Based Signature Schemes and Key Exchange Protocols. IEEE Trans. Computers, Vol. 67, 11 (2018), 1535--1549.
    [22]
    Thomas Espitau, Pierre-Alain Fouque, Beno^it Gérard, and Mehdi Tibouchi. 2017. Side-Channel Attacks on BLISS Lattice-Based Signatures: Exploiting Branch Tracing against strongSwan and Electromagnetic Emanations in Microcontrollers. In ACM CCS 2017, Bhavani M. Thuraisingham, David Evans, Tal Malkin, and Dongyan Xu (Eds.). ACM Press, 1857--1874. https://doi.org/10.1145/3133956.3134028
    [23]
    Thomas Espitau and Antoine Joux. 2020. Certified lattice reduction. Advances in Mathematics of Communications, Vol. 14 (2020), 137.
    [24]
    Tim Güneysu, Vadim Lyubashevsky, and Thomas Pöppelmann. 2012. Practical Lattice-Based Cryptography: A Signature Scheme for Embedded Systems. In CHES 2012 (LNCS ), Emmanuel Prouff and Patrick Schaumont (Eds.), Vol. 7428. Springer, Heidelberg, 530--547. https://doi.org/10.1007/978--3--642--33027--8_31
    [25]
    Nicholas J. Higham. 2002. Accuracy and Stability of Numerical Algorithms second ed.). SIAM.
    [26]
    Nick Howgrave-Graham. 2007. A Hybrid Lattice-Reduction and Meet-in-the-Middle Attack Against NTRU. In CRYPTO 2007 (LNCS ), Alfred Menezes (Ed.), Vol. 4622. Springer, Heidelberg, 150--169. https://doi.org/10.1007/978--3--540--74143--5_9
    [27]
    Andreas Hülsing, Tanja Lange, and Kit Smeets. 2018. Rounded Gaussians - Fast and Secure Constant-Time Sampling for Lattice-Based Crypto. In PKC 2018, Part II (LNCS ), Michel Abdalla and Ricardo Dahab (Eds.), Vol. 10770. Springer, Heidelberg, 728--757. https://doi.org/10.1007/978--3--319--76581--5_25
    [28]
    Yuval Ishai, Amit Sahai, and David Wagner. 2003. Private Circuits: Securing Hardware against Probing Attacks. In CRYPTO 2003 (LNCS ), Dan Boneh (Ed.), Vol. 2729. Springer, Heidelberg, 463--481. https://doi.org/10.1007/978--3--540--45146--4_27
    [29]
    Angshuman Karmakar, Sujoy Sinha Roy, Oscar Reparaz, Frederik Vercauteren, and Ingrid Verbauwhede. 2018. Constant-Time Discrete Gaussian Sampling. IEEE Trans. Computers, Vol. 67, 11 (2018), 1561--1571.
    [30]
    Wangyu Luo, Wael Alghamdi, and Yue M. Lu. 2019. Optimal Spectral Initialization for Signal Recovery With Applications to Phase Retrieval. IEEE Trans. Signal Processing, Vol. 67, 9 (2019), 2347--2356.
    [31]
    Vadim Lyubashevsky. 2009. Fiat-Shamir with Aborts: Applications to Lattice and Factoring-Based Signatures. In ASIACRYPT 2009 (LNCS ), Mitsuru Matsui (Ed.), Vol. 5912. Springer, Heidelberg, 598--616. https://doi.org/10.1007/978--3--642--10366--7_35
    [32]
    Vadim Lyubashevsky. 2012. Lattice Signatures without Trapdoors. In EUROCRYPT 2012 (LNCS ), David Pointcheval and Thomas Johansson (Eds.), Vol. 7237. Springer, Heidelberg, 738--755. https://doi.org/10.1007/978--3--642--29011--4_43
    [33]
    Daniele Micciancio and Michael Walter. 2017. Gaussian Sampling over the Integers: Efficient, Generic, Constant-Time. In CRYPTO 2017, Part II (LNCS ), Jonathan Katz and Hovav Shacham (Eds.), Vol. 10402. Springer, Heidelberg, 455--485. https://doi.org/10.1007/978--3--319--63715-0_16
    [34]
    Peter Pessl, Leon Groot Bruinderink, and Yuval Yarom. 2017. To BLISS-B or not to be: Attacking strongSwan's Implementation of Post-Quantum Signatures. In ACM CCS 2017, Bhavani M. Thuraisingham, David Evans, Tal Malkin, and Dongyan Xu (Eds.). ACM Press, 1843--1855. https://doi.org/10.1145/3133956.3134023
    [35]
    Thomas Pöppelmann, Léo Ducas, and Tim Güneysu. 2014. Enhanced Lattice-Based Signatures on Reconfigurable Hardware. In CHES 2014 (LNCS ), Lejla Batina and Matthew Robshaw (Eds.), Vol. 8731. Springer, Heidelberg, 353--370. https://doi.org/10.1007/978--3--662--44709--3_20
    [36]
    Thomas Prest. 2017. Sharper Bounds in Lattice-Based Cryptography Using the Rényi Divergence. In ASIACRYPT 2017, Part I (LNCS ), Tsuyoshi Takagi and Thomas Peyrin (Eds.), Vol. 10624. Springer, Heidelberg, 347--374. https://doi.org/10.1007/978--3--319--70694--8_13
    [37]
    Thomas Prest, Pierre-Alain Fouque, Jeffrey Hoffstein, Paul Kirchner, Vadim Lyubashevsky, Thomas Pornin, Thomas Ricosset, Gregor Seiler, William Whyte, and Zhenfei Zhang. 2017. FALCON: Fast-Fourier Lattice-based Compact Signatures over NTRU. (11 2017). https://falcon-sign.info.
    [38]
    Oscar Reparaz, Josep Balasch, and Ingrid Verbauwhede. 2017. Dude, is my code constant time?. In DATE, David Atienza and Giorgio Di Natale (Eds.). IEEE, 1697--1702.
    [39]
    Matthieu Rivain and Emmanuel Prouff. 2010. Provably Secure Higher-Order Masking of AES. In CHES 2010 (LNCS ), Stefan Mangard and Franccois-Xavier Standaert (Eds.), Vol. 6225. Springer, Heidelberg, 413--427. https://doi.org/10.1007/978--3--642--15031--9_28
    [40]
    S.L Sobolev. 1963. On a theorem of functional analysis. Transl. Amer. Math. Soc., Vol. 34 (1963), 39--68.
    [41]
    Mehdi Tibouchi and Alexandre Wallet. 2019. One bit is all it takes: a devastating timing attack on BLISS's non-constant time sign flips. Cryptology ePrint Archive, Report 2019/898. (2019). https://eprint.iacr.org/2019/898.
    [42]
    Michael Walter. 2019. Progress in Cryptology - AFRICACRYPT 2019 - 11th International Conference on Cryptology in Africa, Rabat, Morocco, July 9--11, 2019, Proceedings (Lecture Notes in Computer Science), Johannes Buchmann, Abderrahmane Nitaj, and Tajje-eddine Rachidi (Eds.), Vol. 11627. Springer, 157--180.
    [43]
    Thomas Wunderer. 2019. A detailed analysis of the hybrid lattice-reduction and meet-in-the-middle attack. J. Mathematical Cryptology, Vol. 13, 1 (2019), 1--26.
    [44]
    Raymond K. Zhao, Ron Steinfeld, and Amin Sakzad. 2018. FACCT: FAst, Compact, and Constant-Time Discrete Gaussian Sampler over Integers. Cryptology ePrint Archive, Report 2018/1234. (2018). https://eprint.iacr.org/2018/1234.

    Cited By

    View all
    • (2024)Raccoon: A Masking-Friendly Signature Proven in the Probing ModelAdvances in Cryptology – CRYPTO 202410.1007/978-3-031-68376-3_13(409-444)Online publication date: 16-Aug-2024
    • (2023)High-Order Masking of Lattice Signatures in Quasilinear Time2023 IEEE Symposium on Security and Privacy (SP)10.1109/SP46215.2023.10179342(1168-1185)Online publication date: May-2023
    • (2023)Star-Specific Key-Homomorphic PRFs From Learning With Linear RegressionIEEE Access10.1109/ACCESS.2023.329484411(73235-73267)Online publication date: 2023
    • Show More Cited By

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Conferences
    CCS '19: Proceedings of the 2019 ACM SIGSAC Conference on Computer and Communications Security
    November 2019
    2755 pages
    ISBN:9781450367479
    DOI:10.1145/3319535
    Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

    Sponsors

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 06 November 2019

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. constant-time implementation
    2. lattice-based cryptography
    3. masking countermeasure
    4. phase retrieval algorithms
    5. timing attack

    Qualifiers

    • Research-article

    Funding Sources

    • European Union's H2020 Programme
    • French Programme d'Investissement d'Avenir under national project

    Conference

    CCS '19
    Sponsor:

    Acceptance Rates

    CCS '19 Paper Acceptance Rate 149 of 934 submissions, 16%;
    Overall Acceptance Rate 1,261 of 6,999 submissions, 18%

    Upcoming Conference

    CCS '24
    ACM SIGSAC Conference on Computer and Communications Security
    October 14 - 18, 2024
    Salt Lake City , UT , USA

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)39
    • Downloads (Last 6 weeks)2
    Reflects downloads up to 11 Aug 2024

    Other Metrics

    Citations

    Cited By

    View all
    • (2024)Raccoon: A Masking-Friendly Signature Proven in the Probing ModelAdvances in Cryptology – CRYPTO 202410.1007/978-3-031-68376-3_13(409-444)Online publication date: 16-Aug-2024
    • (2023)High-Order Masking of Lattice Signatures in Quasilinear Time2023 IEEE Symposium on Security and Privacy (SP)10.1109/SP46215.2023.10179342(1168-1185)Online publication date: May-2023
    • (2023)Star-Specific Key-Homomorphic PRFs From Learning With Linear RegressionIEEE Access10.1109/ACCESS.2023.329484411(73235-73267)Online publication date: 2023
    • (2023)Polar sampler: A novel Bernoulli sampler using polar codes with application to integer Gaussian samplingDesigns, Codes and Cryptography10.1007/s10623-022-01164-791:5(1779-1811)Online publication date: 13-Jan-2023
    • (2023)Masking the GLP Lattice-Based Signature Scheme at Any OrderJournal of Cryptology10.1007/s00145-023-09485-z37:1Online publication date: 29-Nov-2023
    • (2023)A Detailed Analysis of Fiat-Shamir with AbortsAdvances in Cryptology – CRYPTO 202310.1007/978-3-031-38554-4_11(327-357)Online publication date: 9-Aug-2023
    • (2023)Improved Power Analysis Attacks on FalconAdvances in Cryptology – EUROCRYPT 202310.1007/978-3-031-30634-1_19(565-595)Online publication date: 15-Apr-2023
    • (2023)A Survey on Discrete Gaussian Samplers in Lattice Based CryptographyEmerging Information Security and Applications10.1007/978-3-031-23098-1_6(87-107)Online publication date: 4-Jan-2023
    • (2023)How to Sample a Discrete Gaussian (and more) from a Random OracleTheory of Cryptography10.1007/978-3-031-22365-5_23(653-682)Online publication date: 1-Jan-2023
    • (2022)Generic, efficient and isochronous Gaussian sampling over the integersCybersecurity10.1186/s42400-022-00113-05:1Online publication date: 2-May-2022
    • Show More Cited By

    View Options

    Get Access

    Login options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media