Employing homomorphic integers over three bits seems to be a more instinctive approach. As seen before, the current approach uses three homomorphic booleans, where a sum function is redefined to simulate an addition over three bits. In a nutshell, one cell is surrounded by eight others, and its new state depends on the value of the sum of each neighbor state. However, the computations of the accumulator containing the state of the neighbor cells then requires some tricks. In the case of the Game of Life, using the Boolean type to represent a cell state is natural since there are only two possibilities ( dead or alive). Migrating from Concrete homomorphic Boolean to Concrete homomorphic integers Notice that since the server key does not appear in any code lines referring to homomorphic operations, the concrete version of the program looks exactly like a program computing over clear data. The upgraded code is much simpler: the combination of functions is as easy to read as common Rust conditional statements. return (an encryption of) the new state of the cell Let sum_is_3 = &sum_is_2_or_3 & accumulator.0 Let sum_is_2_or_3 =!accumulator.2 & accumulator.1 This process is detailed in what follows. Similarly, transforming an existing program written with concrete-boolean to concrete is not difficult and makes source code easier to read. In the end, ‘homomorphizing’ a program, i.e., adapting the source code to work on encrypted messages instead of clear ones, is really easy using Concrete. For instance, the computation of an ‘AND’ gate is simply done with the symbol ‘&’ between two ciphertexts, an addition is performed using a ‘+’, etc. Each crate depends on the concrete-core crate, containing low-level cryptographic primitives.Ĭoncrete encompasses all the previous types with an easy-to-use interface, offering syntax as close as possible to that used by Rust : homomorphic operations are, when possible, associated with the same symbol or their clear equivalent. Finally, the concrete-integer crate allows the user to work with larger integers, offering 16 bits of precision. The concrete-shortint crate contains operations for integers whose size does not exceed 7 bits. Namely, there is Concrete Boolean, which allows homomorphic computation of Boolean gates over ciphertexts, encrypting either true or false. The front-end, Concrete, is based on several crates containing cryptographic implementation of operators dedicated to specific message types. The Concrete Framework includes a set of Rust crates. Death: An alive cell with less than two or more than three alive neighbors dies on the next iteration.Ī full introduction on Conway’s Game of Life is available in our previous blogpost. Survival: An alive cell with two or three alive neighbors stays alive on the next iteration.ģ. Birth: A dead cell with three (no more, no less) alive neighbors becomes alive on the next iteration.Ģ. Each cell status is updated iteratively round by round, following this set of rules:ġ. The Game of Life is composed of a board (6圆 in this example) of cells. We will upgrade an already existing example, Conway’s Game of life by Optalysys, using concrete-boolean so it can benefit from new features available in Concrete v0.2. The goal of this blogpost is to see this new version of Concrete in action. In July 2022, Zama announced the latest release of the Concrete Framework that aims at simplifying the use of Fully Homomorphic Encryption, or FHE, a powerful tool allowing users to compute over encrypted data.
0 Comments
Leave a Reply. |