Practical Homomorphic Encryption and Cryptanalysis

Total Page:16

File Type:pdf, Size:1020Kb

Practical Homomorphic Encryption and Cryptanalysis Practical Homomorphic Encryption and Cryptanalysis Dissertation zur Erlangung des Doktorgrades der Naturwissenschaften (Dr. rer. nat.) an der Fakult¨atf¨urMathematik der Ruhr-Universit¨atBochum vorgelegt von Dipl. Ing. Matthias Minihold unter der Betreuung von Prof. Dr. Alexander May Bochum April 2019 First reviewer: Prof. Dr. Alexander May Second reviewer: Prof. Dr. Gregor Leander Date of oral examination (Defense): 3rd May 2019 Author's declaration The work presented in this thesis is the result of original research carried out by the candidate, partly in collaboration with others, whilst enrolled in and carried out in accordance with the requirements of the Department of Mathematics at Ruhr-University Bochum as a candidate for the degree of doctor rerum naturalium (Dr. rer. nat.). Except where indicated by reference in the text, the work is the candidates own work and has not been submitted for any other degree or award in any other university or educational establishment. Views expressed in this dissertation are those of the author. Place, Date Signature Chapter 1 Abstract My thesis on Practical Homomorphic Encryption and Cryptanalysis, is dedicated to efficient homomor- phic constructions, underlying primitives, and their practical security vetted by cryptanalytic methods. The wide-spread RSA cryptosystem serves as an early (partially) homomorphic example of a public- key encryption scheme, whose security reduction leads to problems believed to be have lower solution- complexity on average than nowadays fully homomorphic encryption schemes are based on. The reader goes on a journey towards designing a practical fully homomorphic encryption scheme, and one exemplary application of growing importance: privacy-preserving use of machine learning. 1.1 Cryptography Part: Synopsis Fully homomorphic encryption empowers users to delegate arbitrary computations in a private-preserving way on their encrypted data. Surprisingly, in many scenarios the executing party does not actually need to see the private content in order to return a useful result. This part focuses on efficient ways transforming ubiquitously present machine learning models into privacy-friendly algorithmic cognitive models, achieving strong security notions by returning encrypted results later to be decrypted by the user with the secret key only. New algorithmic constructions, laying the foundation to CPU/GPU implementations, and the pre- sented adaptive parameterization are solutions to sensitive real-world applications like evaluating deep neural networks on private inputs. We propose a practical FHE scheme, FHE{DiNN, tailored to homomorphic inference, exhibiting performance that is independent of the number of a given neural network's layers, and give conclusive, experimental results of our implementation. Portions of the work presented in this part were previously published at CRYPTO 2018 [BMMP18]. 1.2 Cryptanalysis Part: Synopsis This part advances algorithms for variants of subset problems. Generalization of the subset-sum problem to sparse, multidimensional cases, and their reductions to the one-dimensional case are given. Impli- cations to the Learning with Errors (LWE) relate the security of practical cryptographic schemes, as studied in the previous part, with classical and quantum theoretic complexity considerations. We introduce the property of equiprobability, when probabilistic solvers return every subset solution with roughly the same probability, and identify which well-known algorithms need be modified to have it. Portions of the work presented in this part were previously published at AQIS18 [BMR18]. 3 Contents 1 Abstract 3 1.1 Cryptography Part: Synopsis.................................3 1.2 Cryptanalysis Part: Synopsis.................................3 I Cryptology and Homomorphic Encryption 13 2 Introduction 15 2.1 Scope of this Thesis and Problem Statement......................... 16 2.1.1 Community Value of provided Solutions....................... 16 2.2 Implementation: From Formulas to working Code...................... 16 2.2.1 The Advantage of Open-Source Software....................... 16 3 Cryptography and Cryptology 17 3.1 Suitable Problems and Algorithms.............................. 18 3.1.1 Definition of the Learning with Errors problem................... 18 3.2 Complexity Theory....................................... 20 3.3 Boolean Gates, Circuits and Functional Completeness................... 22 4 Cryptology 23 4.1 Threat Model.......................................... 23 4.2 Security Definitions....................................... 23 4.3 Sources of Entropy....................................... 26 4.4 NIST's Post-Quantum Cryptography Standardization................... 26 5 Quantum Computing 27 5.1 Quantum Bits.......................................... 27 5.2 Quantum Computer and Quantum Algorithms....................... 28 5.2.1 Grover's Algorithm................................... 28 5.2.2 Shor's Algorithm.................................... 28 5.2.3 Provable Security and the One-Time Pad...................... 29 6 Homomorphic encryption (HE) 31 6.1 Definitions and Examples of Homomorphic encryption (HE)................ 31 6.1.1 The RSA Cryptosystem and the Factorization Problem.............. 31 6.1.2 Paillier Cryptosystem................................. 32 5 II Fully Homomorphic Encryption (FHE) & Artificial Intelligence (AI) 33 7 Cloud Computing 35 7.1 Cloud Computing: Promises, NSA, Chances, Markets................... 35 7.2 Hardware Solution: Secure Computing Enclaves....................... 37 7.3 Software Solution: FHE and FHE{DiNN .......................... 37 7.3.1 Limitations....................................... 37 8 Mathematical Foundations of FHE 39 8.1 Basic Concepts from Algebra and Probability Theory................... 39 8.2 Lattice Problems for Cryptography.............................. 41 8.2.1 Discrete Gaussian distribution on Lattices...................... 41 8.3 Learning With Errors (LWE)................................. 43 8.3.1 Equivalence between the decisional- (dLWE) and search-LWE (sLWE)...... 44 8.4 Homomorphic Encryption................................... 44 8.4.1 Standardization of Homomorphic Encryption.................... 47 8.5 An Efficient FHE-scheme for Artificial Intelligence (AI).................. 47 9 FHE{DiNN 49 9.1 Localization of this Research within the Field........................ 50 9.1.1 Prior Works and Known Concepts.......................... 50 9.2 Preliminaries.......................................... 51 9.2.1 Notation and Notions................................. 51 9.2.2 Fully Homomorphic Encryption over the Torus (TFHE).............. 51 9.2.3 TGSW: Gadget Matrix and Decomposition..................... 53 9.2.4 Homomorphic Ciphertext Addition and Multiplication............... 54 9.3 Artificial Intelligence, Machine learning, Deep Learning.................. 56 9.3.1 Task: Homomorphic Evaluation of Neural Networks................ 56 9.3.2 The MNIST Handwritten Digit Database...................... 57 9.3.3 Cost Functions Measuring Neural Networks' Performance............. 59 9.3.4 Hyperparameters of a Model............................. 60 9.3.5 Training: The Learning Phase of a Model...................... 60 9.4 FHE{DiNN: Framework for Homomorphic Evaluation of Deep Neural Networks.... 61 9.4.1 Beyond the MNIST dataset: Medical Applications of Image Recognition..... 61 9.4.2 Training Neural Networks: Back-Propagation and Stochastic Gradient Descent. 62 9.5 Discretized Neural Networks: Training and Evaluation................... 62 9.5.1 Discretizing and Evaluation of NNs.......................... 63 9.5.2 Training a DiNN.................................... 64 9.6 Homomorphic Evaluation of a DiNN............................. 65 9.6.1 Evaluating the linear Component: The Multisum.................. 65 9.6.2 Homomorphic Computation of the non-linear sign-Function............ 66 9.6.3 Scale-invariance..................................... 66 9.7 Optimizations within FHE{DiNN over TFHE....................... 67 9.7.1 Reducing Bandwidth: Packing Ciphertexts and FFT................ 67 9.7.2 Early KeySwitch Allows Faster Bootstrapping.................... 69 9.7.3 Programming the Wheel................................ 70 9.7.4 Adaptively Changing the Message Space....................... 72 9.7.5 Reducing Communication Bandwidth: Hybrid Encryption............. 72 9.7.6 Alternative BlindRotate Implementation: Trading-Off Run-Time with Space... 75 9.7.7 Support for various Layers of Unlimited Depth................... 77 9.7.8 Neural Networks for Image Classification...................... 78 9.7.9 Interactive Homomorphic Computation of the argmax Function.......... 79 9.7.10 Beyond Artificial Neural Networks: CapsNets.................... 80 9.8 Practical attack vectors against FHE{DiNN using fplll ................. 80 9.8.1 Security Reductions: TLWE to appSVPγ ...................... 80 9.8.2 Theoretical attack vectors against FHE{DiNN .................. 81 9.8.3 Security Evaluation and Parameter Choices..................... 82 9.8.4 General Attacks on Variants of LWE......................... 83 9.9 Experimental Results...................................... 84 9.10 Comparison with Cryptonets................................. 88 9.10.1 Performance of FHE{DiNN on (clear) inputs x .................. 89 9.10.2 Performance of FHE{DiNN on (encrypted) inputs Enc (x)........... 89 10 FHE & AI on GPUs (cuFHE{DiNN) 91 10.1 Practical FHE evaluation of neural networks using CUDA................. 91 III Cryptanalysis
Recommended publications
  • ARTIFICIAL INTELLIGENCE and ALGORITHMIC LIABILITY a Technology and Risk Engineering Perspective from Zurich Insurance Group and Microsoft Corp
    White Paper ARTIFICIAL INTELLIGENCE AND ALGORITHMIC LIABILITY A technology and risk engineering perspective from Zurich Insurance Group and Microsoft Corp. July 2021 TABLE OF CONTENTS 1. Executive summary 03 This paper introduces the growing notion of AI algorithmic 2. Introduction 05 risk, explores the drivers and A. What is algorithmic risk and why is it so complex? ‘Because the computer says so!’ 05 B. Microsoft and Zurich: Market-leading Cyber Security and Risk Expertise 06 implications of algorithmic liability, and provides practical 3. Algorithmic risk : Intended or not, AI can foster discrimination 07 guidance as to the successful A. Creating bias through intended negative externalities 07 B. Bias as a result of unintended negative externalities 07 mitigation of such risk to enable the ethical and responsible use of 4. Data and design flaws as key triggers of algorithmic liability 08 AI. A. Model input phase 08 B. Model design and development phase 09 C. Model operation and output phase 10 Authors: D. Potential complications can cloud liability, make remedies difficult 11 Zurich Insurance Group 5. How to determine algorithmic liability? 13 Elisabeth Bechtold A. General legal approaches: Caution in a fast-changing field 13 Rui Manuel Melo Da Silva Ferreira B. Challenges and limitations of existing legal approaches 14 C. AI-specific best practice standards and emerging regulation 15 D. New approaches to tackle algorithmic liability risk? 17 Microsoft Corp. Rachel Azafrani 6. Principles and tools to manage algorithmic liability risk 18 A. Tools and methodologies for responsible AI and data usage 18 Christian Bucher B. Governance and principles for responsible AI and data usage 20 Franziska-Juliette Klebôn C.
    [Show full text]
  • The Twin Diffie-Hellman Problem and Applications
    The Twin Diffie-Hellman Problem and Applications David Cash1 Eike Kiltz2 Victor Shoup3 February 10, 2009 Abstract We propose a new computational problem called the twin Diffie-Hellman problem. This problem is closely related to the usual (computational) Diffie-Hellman problem and can be used in many of the same cryptographic constructions that are based on the Diffie-Hellman problem. Moreover, the twin Diffie-Hellman problem is at least as hard as the ordinary Diffie-Hellman problem. However, we are able to show that the twin Diffie-Hellman problem remains hard, even in the presence of a decision oracle that recognizes solutions to the problem — this is a feature not enjoyed by the Diffie-Hellman problem in general. Specifically, we show how to build a certain “trapdoor test” that allows us to effectively answer decision oracle queries for the twin Diffie-Hellman problem without knowing any of the corresponding discrete logarithms. Our new techniques have many applications. As one such application, we present a new variant of ElGamal encryption with very short ciphertexts, and with a very simple and tight security proof, in the random oracle model, under the assumption that the ordinary Diffie-Hellman problem is hard. We present several other applications as well, including: a new variant of Diffie and Hellman’s non-interactive key exchange protocol; a new variant of Cramer-Shoup encryption, with a very simple proof in the standard model; a new variant of Boneh-Franklin identity-based encryption, with very short ciphertexts; a more robust version of a password-authenticated key exchange protocol of Abdalla and Pointcheval.
    [Show full text]
  • A Survey on the Provable Security Using Indistinguishability Notion on Cryptographic Encryption Schemes
    A SURVEY ON THE PROVABLE SECURITY USING INDISTINGUISHABILITY NOTION ON CRYPTOGRAPHIC ENCRYPTION SCHEMES A THESIS SUBMITTED TO THE GRADUATE SCHOOL OF APPLIED MATHEMATICS OF MIDDLE EAST TECHNICAL UNIVERSITY BY EMRE AYAR IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE DEGREE OF MASTER OF SCIENCE IN CRYPTOGRAPHY FEBRUARY 2018 Approval of the thesis: A SURVEY ON THE PROVABLE SECURITY USING INDISTINGUISHABILITY NOTION ON CRYPTOGRAPHIC ENCRYPTION SCHEMES submitted by EMRE AYAR in partial fulfillment of the requirements for the degree of Master of Science in Department of Cryptography, Middle East Technical University by, Prof. Dr. Om¨ ur¨ Ugur˘ Director, Graduate School of Applied Mathematics Prof. Dr. Ferruh Ozbudak¨ Head of Department, Cryptography Assoc. Prof. Dr. Ali Doganaksoy˘ Supervisor, Cryptography, METU Dr. Onur Koc¸ak Co-supervisor, TUB¨ ITAK˙ - UEKAE, Istanbul˙ Examining Committee Members: Assoc. Prof. Dr. Murat Cenk Cryptography, METU Assoc. Prof. Dr. Ali Doganaksoy˘ Department of Mathematics, METU Assist. Prof. Dr. Fatih Sulak Department of Mathematics, Atılım University Date: I hereby declare that all information in this document has been obtained and presented in accordance with academic rules and ethical conduct. I also declare that, as required by these rules and conduct, I have fully cited and referenced all material and results that are not original to this work. Name, Last Name: EMRE AYAR Signature : v vi ABSTRACT A SURVEY ON THE PROVABLE SECURITY USING INDISTINGUISHABILITY NOTION ON CRYPTOGRAPHIC ENCRYPTION SCHEMES Ayar, Emre M.S., Department of Cryptography Supervisor : Assoc. Prof. Dr. Ali Doganaksoy˘ Co-Supervisor : Dr. Onur Koc¸ak February 2018, 44 pages For an encryption scheme, instead of Shannon’s perfect security definition, Goldwasser and Micali defined a realistic provable security called semantic security.
    [Show full text]
  • Information Guide
    INFORMATION GUIDE 7 ALL-PRO 7 NFL MVP LAMAR JACKSON 2018 - 1ST ROUND (32ND PICK) RONNIE STANLEY 2016 - 1ST ROUND (6TH PICK) 2020 BALTIMORE DRAFT PICKS FIRST 28TH SECOND 55TH (VIA ATL.) SECOND 60TH THIRD 92ND THIRD 106TH (COMP) FOURTH 129TH (VIA NE) FOURTH 143RD (COMP) 7 ALL-PRO MARLON HUMPHREY FIFTH 170TH (VIA MIN.) SEVENTH 225TH (VIA NYJ) 2017 - 1ST ROUND (16TH PICK) 2020 RAVENS DRAFT GUIDE “[The Draft] is the lifeblood of this Ozzie Newsome organization, and we take it very Executive Vice President seriously. We try to make it a science, 25th Season w/ Ravens we really do. But in the end, it’s probably more of an art than a science. There’s a lot of nuance involved. It’s Joe Hortiz a big-picture thing. It’s a lot of bits and Director of Player Personnel pieces of information. It’s gut instinct. 23rd Season w/ Ravens It’s experience, which I think is really, really important.” Eric DeCosta George Kokinis Executive VP & General Manager Director of Player Personnel 25th Season w/ Ravens, 2nd as EVP/GM 24th Season w/ Ravens Pat Moriarty Brandon Berning Bobby Vega “Q” Attenoukon Sarah Mallepalle Sr. VP of Football Operations MW/SW Area Scout East Area Scout Player Personnel Assistant Player Personnel Analyst Vincent Newsome David Blackburn Kevin Weidl Patrick McDonough Derrick Yam Sr. Player Personnel Exec. West Area Scout SE/SW Area Scout Player Personnel Assistant Quantitative Analyst Nick Matteo Joey Cleary Corey Frazier Chas Stallard Director of Football Admin. Northeast Area Scout Pro Scout Player Personnel Assistant David McDonald Dwaune Jones Patrick Williams Jenn Werner Dir.
    [Show full text]
  • On Notions of Security for Deterministic Encryption, and Efficient Constructions Without Random Oracles
    A preliminary version of this paper appears in Advances in Cryptology - CRYPTO 2008, 28th Annual International Cryptology Conference, D. Wagner ed., LNCS, Springer, 2008. This is the full version. On Notions of Security for Deterministic Encryption, and Efficient Constructions without Random Oracles Alexandra Boldyreva∗ Serge Fehr† Adam O’Neill∗ Abstract The study of deterministic public-key encryption was initiated by Bellare et al. (CRYPTO ’07), who provided the “strongest possible” notion of security for this primitive (called PRIV) and con- structions in the random oracle (RO) model. We focus on constructing efficient deterministic encryption schemes without random oracles. To do so, we propose a slightly weaker notion of security, saying that no partial information about encrypted messages should be leaked as long as each message is a-priori hard-to-guess given the others (while PRIV did not have the latter restriction). Nevertheless, we argue that this version seems adequate for certain practical applica- tions. We show equivalence of this definition to single-message and indistinguishability-based ones, which are easier to work with. Then we give general constructions of both chosen-plaintext (CPA) and chosen-ciphertext-attack (CCA) secure deterministic encryption schemes, as well as efficient instantiations of them under standard number-theoretic assumptions. Our constructions build on the recently-introduced framework of Peikert and Waters (STOC ’08) for constructing CCA-secure probabilistic encryption schemes, extending it to the deterministic-encryption setting and yielding some improvements to their original results as well. Keywords: Public-key encryption, deterministic encryption, lossy trapdoor functions, leftover hash lemma, standard model. ∗ College of Computing, Georgia Institute of Technology, 266 Ferst Drive, Atlanta, GA 30332, USA.
    [Show full text]
  • Linear Generalized Elgamal Encryption Scheme Pascal Lafourcade, Léo Robert, Demba Sow
    Linear Generalized ElGamal Encryption Scheme Pascal Lafourcade, Léo Robert, Demba Sow To cite this version: Pascal Lafourcade, Léo Robert, Demba Sow. Linear Generalized ElGamal Encryption Scheme. In- ternational Conference on Security and Cryptography (SECRYPT), Jul 2020, Paris, France. hal- 02559556 HAL Id: hal-02559556 https://hal.archives-ouvertes.fr/hal-02559556 Submitted on 30 Apr 2020 HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. Linear Generalized ElGamal Encryption Scheme Pascal Lafourcade1,Leo´ Robert1, and Demba Sow2 1LIMOS, Universite´ Clermont Auvergne, France, [email protected] , [email protected] 2LACGAA, Universite´ Cheikh Anta Diop de Dakar, Sen´ egal´ , [email protected] Keywords: Cryptography, Partial homomorphic encryption, Linear Assumption, ElGamal encryption scheme. Abstract: ElGamal public key encryption scheme has been designed in the 80’s. It is one of the first partial homomorphic encryption and one of the first IND-CPA probabilistic public key encryption scheme. A linear version has been recently proposed by Boneh et al. In this paper, we present a linear encryption based on a generalized version of ElGamal encryption scheme. We prove that our scheme is IND-CPA secure under linear assumption.
    [Show full text]
  • Formalizing Public Key Cryptography
    Cryptography CS 555 Topic 29: Formalizing Public Key Cryptography 1 Recap • Key Management • Diffie Hellman Key Exchange • Password Authenticated Key Exchange (PAKEs) 2 Public Key Encryption: Basic Terminology • Plaintext/Plaintext Space • A message m c • Ciphertext ∈ ℳ • Public/Private Key Pair , ∈ ∈ 3 Public Key Encryption Syntax • Three Algorithms • Gen(1 , ) (Key-generation algorithm) • Input: Random Bits R Alice must run key generation • Output: , algorithm in advance an publishes the public key: pk • Enc ( ) (Encryption algorithm) pk ∈ • Decsk( ) (Decryption algorithm) • Input: Secret∈ key sk and a ciphertex c • Output: a plaintext message m Assumption: Adversary only gets to see pk (not sk) ∈ ℳ • Invariant: Decsk(Encpk(m))=m 4 Chosen-Plaintext Attacks • Model ability of adversary to control or influence what the honest parties encrypt. • Historical Example: Battle of Midway (WWII). • US Navy cryptanalysts were able to break Japanese code by tricking Japanese navy into encrypting a particular message • Private Key Cryptography 5 Recap CPA-Security (Symmetric Key Crypto) m0,1,m1,1 c1 = EncK(mb,1) m0,2,m1,2 c2 = EncK(mb,2) m0,3,m1,3 c3 = EncK(mb,3) … b’ Random bit b (negligible) s. t K = Gen(.) 1 Pr = + ( ) ∀ ∃ 2 6 ′ ≤ Chosen-Plaintext Attacks • Model ability of adversary to control or influence what the honest parties encrypt. • Private Key Crypto • Attacker tricks victim into encrypting particular messages • Public Key Cryptography • The attacker already has the public key pk • Can encrypt any message s/he wants! • CPA Security is critical! 7 CPA-Security (PubK , n ) Public Key:LR pk−cpa , A Π 1 1 = 0 1 , = 2 , 2 0 1 3 3 = 0 1 … b’ Random bit b (negligible) s.
    [Show full text]
  • Semantic Security and Indistinguishability in the Quantum World June 1, 2016?
    Semantic Security and Indistinguishability in the Quantum World June 1, 2016? Tommaso Gagliardoni1, Andreas H¨ulsing2, and Christian Schaffner3;4;5 1 CASED, Technische Universit¨atDarmstadt, Germany [email protected] 2 TU Eindhoven, The Netherlands [email protected] 3 Institute for Logic, Language and Compuation (ILLC), University of Amsterdam, The Netherlands [email protected] 4 Centrum Wiskunde & Informatica (CWI) Amsterdam, The Netherlands 5 QuSoft, The Netherlands Abstract. At CRYPTO 2013, Boneh and Zhandry initiated the study of quantum-secure encryption. They proposed first indistinguishability def- initions for the quantum world where the actual indistinguishability only holds for classical messages, and they provide arguments why it might be hard to achieve a stronger notion. In this work, we show that stronger notions are achievable, where the indistinguishability holds for quantum superpositions of messages. We investigate exhaustively the possibilities and subtle differences in defining such a quantum indistinguishability notion for symmetric-key encryption schemes. We justify our stronger definition by showing its equivalence to novel quantum semantic-security notions that we introduce. Furthermore, we show that our new security definitions cannot be achieved by a large class of ciphers { those which are quasi-preserving the message length. On the other hand, we pro- vide a secure construction based on quantum-resistant pseudorandom permutations; this construction can be used as a generic transformation for turning a large class of encryption schemes into quantum indistin- guishable and hence quantum semantically secure ones. Moreover, our construction is the first completely classical encryption scheme shown to be secure against an even stronger notion of indistinguishability, which was previously known to be achievable only by using quantum messages and arbitrary quantum encryption circuits.
    [Show full text]
  • Homomorphic Encryption Library
    Ludwig-Maximilians-Universit¨at Munchen¨ Prof. Dr. D. Kranzlmuller,¨ Dr. N. gentschen Felde Data Science & Ethics { Microsoft SEAL { Exercise 1: Library for Matrix Operations Microsoft's Simple Encrypted Arithmetic Library (SEAL)1 is a publicly available homomorphic encryption library. It can be found and downloaded at http://sealcrypto.codeplex.com/. Implement a library 13b MS-SEAL.h supporting matrix operations using homomorphic encryption on basis of the MS SEAL. due date: 01.07.2018 (EOB) no. of students: 2 deliverables: 1. Implemenatation (including source code(s)) 2. Documentation (max. 10 pages) 3. Presentation (10 { max. 15 minutes) 13b MS-SEAL.h #i n c l u d e <f l o a t . h> #i n c l u d e <s t d b o o l . h> typedef struct f double ∗ e n t r i e s ; unsigned int width; unsigned int height; g matrix ; /∗ Initialize new matrix: − reserve memory only ∗/ matrix initMatrix(unsigned int width, unsigned int height); /∗ Initialize new matrix: − reserve memory − set any value to 0 ∗/ matrix initMatrixZero(unsigned int width, unsigned int height); /∗ Initialize new matrix: − reserve memory − set any value to random number ∗/ matrix initMatrixRand(unsigned int width, unsigned int height); 1https://www.microsoft.com/en-us/research/publication/simple-encrypted-arithmetic-library-seal-v2-0/# 1 /∗ copy a matrix and return its copy ∗/ matrix copyMatrix(matrix toCopy); /∗ destroy matrix − f r e e memory − set any remaining value to NULL ∗/ void freeMatrix(matrix toDestroy); /∗ return entry at position (xPos, yPos), DBL MAX in case of error
    [Show full text]
  • Exploring Naccache-Stern Knapsack Encryption
    Exploring Naccache-Stern Knapsack Encryption Éric Brier1, Rémi Géraud2, and David Naccache2 1 Ingenico Terminals Avenue de la Gare f- Alixan, France [email protected] 2 École normale supérieure rue d’Ulm, f- Paris cedex , France {remi.geraud,david.naccache}@ens.fr Abstract. The Naccache–Stern public-key cryptosystem (NS) relies on the conjectured hardness of the modular multiplicative knapsack problem: Q mi Given p, {vi}, vi mod p, find the {mi}. Given this scheme’s algebraic structure it is interesting to systematically explore its variants and generalizations. In particular it might be useful to enhance NS with features such as semantic security, re-randomizability or an extension to higher-residues. This paper addresses these questions and proposes several such variants. Introduction In , Naccache and Stern (NS, []) presented a public-key cryptosystem based on the conjectured hardness of the modular multiplicative knapsack problem. This problem is defined as follows: Let p be a modulus and let v0, . , vn−1 ∈ Zp. n−1 Y mi Given p, v0, . , vn−1, and vi mod p, find the {mi}. i=0 Given this scheme’s algebraic structure it is interesting to determine if vari- ants and generalizations can add to NS features such as semantic security, re-randomizability or extend it to operate on higher-residues. This paper addresses these questions and explores several such variants. The Original Naccache–Stern Cryptosystem The NS cryptosystem uses the following sub-algorithms: p is usually prime but nothing prevents extending the problem to composite RSA moduli. – Setup: Pick a large prime p and a positive integer n.
    [Show full text]
  • Arxiv:2102.00319V1 [Cs.CR] 30 Jan 2021
    Efficient CNN Building Blocks for Encrypted Data Nayna Jain1,4, Karthik Nandakumar2, Nalini Ratha3, Sharath Pankanti5, Uttam Kumar 1 1 Center for Data Sciences, International Institute of Information Technology, Bangalore 2 Mohamed Bin Zayed University of Artificial Intelligence 3 University at Buffalo, SUNY 4 IBM Systems 5 Microsoft [email protected], [email protected], [email protected]/[email protected], [email protected], [email protected] Abstract Model Owner Model Architecture 푴 Machine learning on encrypted data can address the concerns Homomorphically Encrypted Model Model Parameters 퐸(휽) related to privacy and legality of sharing sensitive data with Encryption untrustworthy service providers, while leveraging their re- Parameters 휽 sources to facilitate extraction of valuable insights from oth- End-User Public Key Homomorphically Encrypted Cloud erwise non-shareable data. Fully Homomorphic Encryption Test Data {퐸(퐱 )}푇 Test Data 푖 푖=1 FHE Computations Service 푇 Encryption (FHE) is a promising technique to enable machine learning {퐱푖}푖=1 퐸 y푖 = 푴(퐸 x푖 , 퐸(휽)) Provider and inferencing while providing strict guarantees against in- Inference 푇 Decryption formation leakage. Since deep convolutional neural networks {푦푖}푖=1 Homomorphically Encrypted Inference Results {퐸(y )}푇 (CNNs) have become the machine learning tool of choice Private Key 푖 푖=1 in several applications, several attempts have been made to harness CNNs to extract insights from encrypted data. How- ever, existing works focus only on ensuring data security Figure 1: In a conventional Machine Learning as a Ser- and ignore security of model parameters. They also report vice (MLaaS) scenario, both the data and model parameters high level implementations without providing rigorous anal- are unencrypted.
    [Show full text]
  • Arx: an Encrypted Database Using Semantically Secure Encryption
    Arx: An Encrypted Database using Semantically Secure Encryption Rishabh Poddar Tobias Boelter Raluca Ada Popa UC Berkeley UC Berkeley UC Berkeley [email protected] [email protected] [email protected] ABSTRACT some of which are property-preserving by design (denoted In recent years, encrypted databases have emerged as a PPE schemes), e.g., order-preserving encryption (OPE) [8, promising direction that provides data confidentiality with- 9, 71] or deterministic encryption (DET). OPE and DET out sacrificing functionality: queries are executed on en- are designed to reveal the order and the equality relation crypted data. However, many practical proposals rely on a between data items, respectively, to enable fast order and set of weak encryption schemes that have been shown to leak equality operations. However, while these PPE schemes con- sensitive data. In this paper, we propose Arx, a practical fer protection in some specific settings, a series of recent and functionally rich database system that encrypts the data attacks [26, 37, 61] have shown that given certain auxiliary only with semantically secure encryption schemes. We show information, an attacker can extract significant sensitive in- that Arx supports real applications such as ShareLaTeX with formation from the order and equality relations revealed by a modest performance overhead. these schemes. These works demonstrate offline attacks in which the attacker steals a PPE-encrypted database and PVLDB Reference Format: analyzes it offline. Rishabh Poddar, Tobias Boelter, and Raluca Ada Popa. Arx: Leakage from queries refers to what an (online) attacker An Encrypted Database using Semantically Secure Encryption. PVLDB, 12(11): 1664-1678, 2019.
    [Show full text]