Home / Companies / Zama / Blog / June 2023

June 2023 Summaries

6 posts from Zama

Filter
Month: Year:
Post Summaries Back to Blog
The blog post outlines a tutorial for building a homomorphic regular expression engine using TFHE-rs, a Rust library for fully homomorphic encryption (FHE), based on a contribution from a participant in the Zama Bounty Program. It explains the construction of a regex Pattern Matching Engine (PME) that operates on encrypted ASCII bytes, highlighting the power and flexibility of regex for searching text structures. The tutorial covers the creation of an Abstract Syntax Tree (AST) from regex patterns, the translation of these patterns into a RegExpr data structure using Rust's enum type, and the parsing and matching processes against encrypted content. The post discusses the challenges of encoding content into encrypted states and contrasts two strategies for this, ultimately recommending the encryption of entire ASCII values for efficiency in FHE operations. It also contrasts direct AST recursion with the construction of a Deterministic Finite Automata (DFA), although the latter is impractical due to the encrypted nature of the content. Additionally, the post describes optimizations to reduce the number of FHE operations, such as delaying execution paths and caching known expression results, and concludes with instructions on compiling and running the example implementation for testing and performance analysis.
Jun 30, 2023 3,483 words in the original blog post.
The blog post introduces the fhEVM protocol, which enables private smart contracts using Fully Homomorphic Encryption (FHE) to perform computations on encrypted data without decryption, thereby ensuring confidentiality. The protocol allows developers to use existing Ethereum Virtual Machine (EVM) tools to build applications where transaction inputs and states remain encrypted on the blockchain, under a global network key. This encryption supports multi-user interactions and composability, with smart contract developers controlling access to decrypted states through consensus among validators. The fhEVM provides encrypted integer data types for easier contract development, supports various traditional integer operations, and includes mechanisms like zero-knowledge proofs to prevent misuse. The post demonstrates the application of fhEVM through an example of a confidential ERC20 token, where balances and amounts transferred are encrypted, and highlights the potential for broader applications such as blind auctions and confidential decentralized finance (DeFi). Future enhancements, such as an FHE random number generator, are also mentioned to improve the protocol's capability.
Jun 28, 2023 1,476 words in the original blog post.
The blog post outlines two significant advancements in improving the efficiency of Fully Homomorphic Encryption (FHE), as detailed in the scientific paper BBB+23 published in the Journal of Cryptology. The first contribution involves an optimization framework for the TFHE scheme, aiming to minimize computational costs while maintaining precision, security, and correctness by carefully selecting macro and micro parameters. The second contribution introduces the Without Bit of Padding Programmable Bootstrapping (WoP-PBS), which eliminates the need for a padding bit, thereby enhancing the speed and scalability of processing higher precision messages compared to the standard Programmable Bootstrapping (PBS). This innovation allows for the efficient evaluation of multivariate lookup tables on messages exceeding 10 bits, outperforming previous methods such as the tree-PBS, particularly in terms of scalability and speed as precision increases. The discussion highlights the importance of these advancements in optimizing homomorphic computations and selecting optimal parameters, contributing to the broader field of cryptographic research and application.
Jun 15, 2023 1,437 words in the original blog post.
In a tutorial developed as part of the Zama Bounty Program, the process of creating, training, and evaluating a LinearSVR regression model using the open-source Concrete ML library is detailed, with an emphasis on privacy-preserving techniques through Fully Homomorphic Encryption (FHE). The tutorial uses a single explanatory variable for simplicity, facilitating visualization of its relationship with the target variable, and employs a grid search to identify optimal hyperparameters for the LinearSVR model, including the inverse strength of the l2 penalization and the margin for support vectors. The process also involves quantization, which converts floating-point data to discrete integers, and compiling the quantized model for FHE to perform homomorphic inference. The tutorial compares the performance of models trained using Scikit-learn and Concrete ML, demonstrating that both methods yield similar results, with minimal performance differences attributed to the quantization and compilation processes. Moreover, the tutorial highlights the importance of providing a comprehensive data set during the compilation phase to ensure the FHE model's decision rule accurately generalizes beyond the observed data range.
Jun 13, 2023 2,132 words in the original blog post.
The Zama Bounty Program's second season invited participants to create a tutorial comparing the performance of various regressors in Concrete ML with those in scikit-learn, with a particular focus on Fully Homomorphic Encryption (FHE). The blog post, based on a contribution by GitHub user AmT42, explores how Concrete ML's regressors, which closely mirror the API of scikit-learn, can be compiled and tested in FHE using a simulated environment to assess their performance. The tutorial evaluates different regression models—linear, neural networks, and tree-based—using R2 scores, highlighting that Concrete ML models perform well on encrypted data despite quantization, with linear models showing minimal performance loss and tree-based models maintaining good scores. Neural networks, while facing heavy quantization, still perform admirably due to Quantization Aware Training, although models like XGBRegressor require further hyperparameter optimization to bridge the performance gap between FHE and their fp32 counterparts. Suggestions include using GridSearch for better optimization and noting that the low sample size may impact runtime, especially for complex models.
Jun 13, 2023 2,170 words in the original blog post.
Concrete ML is a set of privacy-preserving machine learning tools designed to simplify the use of Fully Homomorphic Encryption (FHE) for developers, enabling them to automatically convert machine learning models into their homomorphic equivalents. In a video tutorial, Roman Bredehoft, a machine learning engineer at Zama, demonstrates the straightforward process of transforming a scikit-learn model into its homomorphic form using Concrete ML. The initiative encourages developers to engage further by starring the Concrete ML GitHub repository, reviewing its documentation, participating in community support channels, and exploring the Zama Bounty Program, which offers opportunities to learn FHE, contribute to advancements in the field, and earn rewards.
Jun 08, 2023 107 words in the original blog post.