All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- [important] Restrict that the minimal JDK version is JDK 21. We merge
mpc4j-crypto-simd
into corresponding modulues. - Implement Half-tree introduced in EUROCRYPT 2023.
- Implement EACode and ECCode introduced in CRYPTO 2022 and CRYPTO 2023, respectively.
- Implement Secret-shared shuffle introduced in ASIACRYPT 2020.
- Implement altering module OPRF introduced in CRYPTO 2024.
- Speedup
GF2E
implementations.
- We fully re-organized PIR implementations and now they are more clear and easy to read.
- We fully re-organized PCG implementations, moving triple, daBit, OSN from
mpc4j-s2pc-opf
tompc4j-s2pc-aby
. Based on this modification, we implement aTrustedDealer
to deal with all PCG generations.
- Fixed a bug for the implementation of order-preserving encryption (EUROCRYPT 2009). Now that order-preserving encryption supports any output range
$\mathcal{R}$ conditioned on$|\mathcal{R}| \geq |\mathcal{D}|$ where$|\mathcal{D}|$ is the input range. - Fixed a bug for PSU implementations. Now we can correctly verify if PSU is implemented correctly.
- [important] Create a new module
mpc4j-crypto-simd
, introduce Vector API to implement SIMD operations for bit matrix transpose. However, this requires to developmpc4j
using JDK 17 or later. - Create a new module
mpc4j-crypto-algs
, implement order-preserving encryption (EUROCRYPT 2009). - Create a new module
mpc4j-s3pc-abb3
, start to implement honest-majority three-party protocols. - Now
mpc4j
automatically compresses equal-length data packet forNettyRpc
. - Implement Waksman networks.
- Implement unbalanced private set union proposed in CCS 2023.
- update the package format so that now
mpc4j
allows many sub-protocols. - update the implementation of
BandLinearSolver
. Now the implementation only needs linear memory cost. - re-organize OKVS implementation, remove many unnecessary codes.
- Fix a bug that
FileRpc
wrongly counts the communication cost. - Fix a bug that reports
invalid pointer
when running examples. The bug comes from MCL. Considering the fact the OpenSSL also provides asm implementations for ECC, we now remove MCL.
- [important]
mpc4j-crypto-fhe
- Create a new module
mpc4j-crypto-fhe
to add implementations for FHE. - Implement BFV scheme. The implementation can be seen as a Pure-Java version of SEAL.
- Create a new module
-
[important]
mpc4j-common-structure
- rename
mpc4j-crypto-matrix
tompc4j-common-structure
and re-organize codes. Move Filter and LPN frommpc4j-common-tool
tompc4j-common-structure
. - Update serialization methods for Filters to same communication costs.
- rename
-
mpc4j-common-tool
- Optimize
reduceByteArray
inBytesUtils
.
- Optimize
-
mpc4j-s2pc-pir
- Refine code for SimplePIR.
mpc4j-s2pc-opf
- Fix a bug that OprfUtils generates wrong sets for unequal set size.
mpc4j-s2pc-pir
- Fix a security flow in the implementation of Labeled PSI (CCS 2021).
mpc4j-s2pc-pso
- Fix some bugs and refine codes for many PSI implementations.
mpc4j-common-tool
- Introduce the way of setting ball-and-box argument in open source code VOLE-PSI, see
MaxBinSizeUtils
for more details. - Introduce a more efficient way of doing operations in GF128 field. The implementation is inspired by the blog Reversing a Finite Filed Multiplication Optimizaion.
- Implement operations in GF64 field.
- Introduce the way of setting ball-and-box argument in open source code VOLE-PSI, see
mpc4j-common-matrix
- Implement "Blazing Fast OKVS" introduced in the paper "Blazing Fast PSI from Improved OKVS and Subfield VOLE". The implementation is inspired by the open-source code VOLE-PSI.
- Implement "band encoding OKVS" introduced in the paper "Near-Optimal Oblivious Key-Value Stores for Efficient PSI, PSU and Volume-Hiding Multi-Maps". We thank Joon Young Seo and Kevin Yeo for the offline discussion of some implementation details.
mpc4j-s2pc-pcg
- Implement silent VOLE (both for semi-honest version and the malicious version) in GF128 field, using the technique introduced in the paper "Wolverine: Fast, Scalable, and Communication-Efficient Zero-Knowledge Proofs for Boolean and Arithmetic Circuits".
- Implement single-point OT / single-point VOLE for ease of tests.
mpc4j-s2pc-opf
- Implement private set membership protocol introduced in the paper "Circuit-PSI with Linear Complexity via Relaxed Batch OPPRF".
- Implement VOLE-OPRF introduced in the paper "VOLE-PSI: fast OPRF and circuit-PSI from vector-OLE".
mpc4j-s2pc-pir
- Implement native and PBC batch query for index PIR.
- Implement unbalanced circuit PSI introduced in the paper "PSI with computation or Circuit-PSI for Unbalanced Sets from Homomorphic Encryption".
- Implement circuit PSI (both for equal-size and unequal-size) introduced in the paper "Efficient circuit-based PSI with linear communication".
- Implement circuit PSI (both for equal-size and unequal-size) introduced in the paper "Circuit-PSI with Linear Complexity via Relaxed Batch OPPRF".
- Implement client-preprocessing PIR introduced in the paper "Piano : Extremely Simple , Single-Server PIR with Sublinear Server Computation". The implementation is inspired by the open-source code Piano-PIR.
- Implement client-preprocessing PIR introduced in the paper "Simple and Practical Amortized Sublinear Private Information Retrieval".
mpc4j-s2pc-pso
- Implement aider-PSI introduced in the paper "Scaling private set intersection to billion-element sets".
- Implement RT21 PSI introduced in the paper "Compact and Malicious Private Set Intersection for Small Sets". The implementation is inspired by the open-source code MiniPSI.
- Implement PRTY19 PSI introduced in the paper "SpOT-Light : Lightweight Private Set Intersection from Sparse OT Extension".
- Implement PRTY20 PSI introduced in the paper "PSI from PaXoS: Fast, Malicious Private Set Intersection".
- Implement DCW13 PSI introduced in the paper "When private set intersection meets big data: An efficient and scalable protocol".
- Implement RS21 PSI introduced in the paper "VOLE-PSI: fast OPRF and circuit-PSI from vector-OLE".
- Implement RR22 PSI introduced in the paper "Blazing Fast PSI from Improved OKVS and Subfield VOLE".
- Implement PSZ14 PSI introduced in the paper "Faster Private Set Intersection based on OT Extension".
mpc4-common-tool
- Introduce ways of computing distinct hashes in the open-source code VOLE-PSI (related to Bloom Filter, Garbled Bloom Filter, and Garbled Cuckoo Table).
- Choose parameters for no-stash cuckoo hash for small item sizes.
mpc4j-common-matrix
- Refactor codes for OKVS so that OKVS implementations with doubly obliviousness share the same code with standard OKVS implementations.
mpc4j-s2pc-pir
- Faster matrix multiplication by avoiding unnecessary module operation in SimplePIR.
- Refined labeled-PSI implementations based on the open-source code APSI of the paper "Labeled PSI from Homomorphic Encryption with Reduced Computation and Communication".
- common
- Update documentations to show to install FourQ, and how to solve the problem if FourQ test cases are failed.
mpc4j-s2pc-pcg
- Fix a bug for wrong LPN parameters used in silent OT.
- Fix a bug for malicious-secure 1-out-of-2 COT introduced in the paper "SoftSpokenOT: Communication - Computation Tradeoffs in OT Extension" and fixed by the revised version of the paper "Actively Secure OT Extension with Optimal Overhead".
mpc4j-s2pc-pir
- Fix a bug for SimplePIR to support values with arbitrary bit length (instead of bit length that divides
Byte.SIZE
). - Fix a bug for Vectorized PIR to support values with arbitrary bit length (instead of bit length that divides
Byte.SIZE
).
- Fix a bug for SimplePIR to support values with arbitrary bit length (instead of bit length that divides
mpc4j-s2pc-pjc
- fix a bug when running PID with unequal set size.
mpc4j-common-circuit
- We abstract
MpcZlVector
andMpcZlParty
. - We add some circuit implementations, including adder, multiplier, and sorting network.
- We abstract
mpc4j-common-tool
- We add a new BitVector named
CombinedBitVector
that tries its best to support efficient BitVector operations. Now users can useCombinedBitVector
for all cases.
- We add a new BitVector named
mpc4j-crypto-matrix
- We implement Zp matrix and Zp64 matrix.
mpc4j-s2pc-pcg
- We implement coin-tossing protocols with semi-honest and malicious security.
mpc4j-sp2c-aby
- We implement Trust-Dealer model, that is, an aider can distribute Boolean and Multiplication triples for general MPC.
- We implement daBits and EdaBits.
- We implement some comparisons.
mpc4j-s2pc-opf
- We implement Naor-Ringold OPRF, and OPRP-based OPRF.
mpc4j-s2pc-pir
- We implement more index PIRs, including Simple / Double PIR (USENIX Security 2023), Mul PIR (USENIX Security 2021), constant-weight PIR (USENIX Security 2022).
- We implement Pantheon PIR (VLDB 2022).
mpc4j-s2pc-pso
- We formalize and implement some PSI cardinality protocols, including EC-DH-based, DH-OPRF-based, and circuit-PSI-based.
- We implement server-aided PSI protocols.
- others
- We add test cases for PSU, PID and PMID.
mpc4j-common-tool
- We refine Filter implementations.
- We refine implementations for sparse bit vector and sparse bit matrix.
mpc4j-s2pc-pcg
- We add silent model for all protocols that can leverage silent OT to reduce communication costs.
- We remove number of bits / number of elements in general MPC.
mpc4j-crypto-matrix
- We move OKVS implementations into
mpc4j-crypto-matrix
.
- We move OKVS implementations into
- others
- We refine configs for multi-party protocols so that we can remove many duplicate codes.
- We refine test cases for multi-party protocols so tha we can remove many duplicate codes.
mpc4j-common-tool
- We fixed a bug in CommitFactory. We need to create a commitment scheme with SHA256 hash for STANDARD and with SM3 hash for INLAND.
mpc4j-crypto-matrix
- We fixed a bug for
toString()
in vectors and databases. We need to correctly display the string even if the vector (the database) is empty (with num = 0).
- We fixed a bug for
mpc4j-common-circuit
- We add a new module
mpc4j-common-circuit
to write all circuits in a unified manner. - We add some basic integer circuits: add, sub, increase one, equality (eq), less than or equal to (leq).
- We add a new module
mpc4j-crypto-matrix
- We add a new module
mpc4j-crypto-matrix
to put functionalities related to cryptographic matrix operations. - We add some database / vector implementations.
- We add a new module
mpc4j-common-rpc
- We add
receiveAny()
in Rpc. - We update the way of generating taskId. Now all sub-protocols have the same taskId with the root protocol. We distinguish sub-protocols using encodeTaskId. See
AbstractMultiPartyPto
for more details.
- We add
mpc4j-common-tool
- We add algebra operation interfaces in
galoisfiled
, including zl (Z mod (1 << l)), zl64 (Z mod (1 << l) where l < 64), zn (Z mod n), zn64 (Z mod n where n < (1 << 64)), zp (Z mod p where p is a prime), zp64 (Z mod p where p is a prime and p < (1 << 64)). - We introduce FourQ ECC.
- We add algebra operation interfaces in
mpc4j-dp-service
- Now main supports more configurations: (1) Allow running without plain case; (2) Allow no/empty settings for α, ε_w, fo_types, hg_types.
- Add necessary test cases for HhLdpMain.
mpc4j-s2pc-pcg
- We add HE-based and OT-based multiplication triple generation protocols introduced in the DSZ15 paper.
- We add FHE-based multiplication triple generation protocol introduced in the RSS19 paper.
- We implement pre-computed 1-out-of-n OTs based on the silent OT.
mpc4j-s2pc-aby
- We refine many implementations for Boolean circuits.
- We implement mux operations introduced in RRK+20 and RRG+21 papers.
- We implement Boolean circuit based PEQT protocol and the optimized PEQT protocol introduced in the CGS22 paper.
mpc4j-s2pc-pir
- We implement vector PIR introduced in the MR23 paper.
mpc4j-s2pc-opf
- We create a new module
mpc4j-s2pc-opf
for oblivious pseudo-random functions. - We implement programmable OPRFs based on OKVS introduced in the PSTY19 paper.
- We implement related-batch programmable OPRFs introduced in the CGS22 paper.
- We implement single-query OPRF introduced in the RA17 paper.
- We create a new module
mpc4j-s2pc-pso
- We implement two circuit PSI protocols (without associated payload) introduced in the PSTY19 and CGS22 paper.
-
mpc4j-common-tool
- Fix a bug when switching the elliptic curve. In Missing docs for c++ interface? #72, the MCL author said "The current version does not support multi parameters. At first, I had developed the features, but I gave up it because a class dependency was very complicated." It brings some problems when we want to switch from an elliptic curve to another one that both use MCL. Now, we only allow users to use SEC_P256_K1 with MCL.
-
mpc4j-dp-service
- Fix a bug for AppleHcmsFoLdp, we note that in Java, a % b (for b > 0) can have negative value. Therefore, we need to write Math.abs(a % b) instead of directly a % b to ensure a % b must be in [0, b). Thank Xiaochen Li for the report.
- Fix a bug for OLH and FLH, we note that
$g$ in OLH and FLH must be an integer. Therefore, we cannot directly use the optimized frequency estimation formula to estimate the count. Instead, we use the original formula.
-
mpc4j-s2pc-pcg
- We slightly reduce the communication cost for distributed oblivious puncturable OPRF.
-
mpc4j-s2pc-aby
- Now we allow large BitNums per operations in the Boolean circuit.
mpc4j-common-sampler
- We implement many discrete Gaussian sampling techniques, including native sampling, Alias sampling, sigma-2 sampling, convolution techniques, and discrete gaussian sampling introduced in NIPS 2020.
mpc4j-common-tool
- We implement metrics used for HeavyHitter (in
metrics/HeavyHitterMetrics.java
), including NDCG (Normalized Discounted Cumulative Gain), precision, and relative error. - We introduce a new tool named
BitVector
for efficient bit operations. - We add
MathPreconditions
for math precondition checks. - We implement the non-cryptographic hash function BobHash and introduce xxHash in pure-Java.
- We implement metrics used for HeavyHitter (in
mpc4j-dp-service
- We create a new module
mpc4j-dp-service
for implementing specific differential private mechanisms, e.g., Frequency Oracles. - We implement state-of-the-art LDP-based frequency oracle mechanisms, including Hadamard-related mechanisms, Unary Encoding (UE)-related mechanisms, Direct Encoding (DE)-related mechanisms, Local Hash (LH)-based mechanisms.
- We create a new module
mpc4j-s2pc-pir
- We implement SealPIR, OnionPIR and FastPIR.
mpc4j-s2pc-pjc
- We create a new module
mpc4j-s2pc-pjc
to manage "Private Join and Compute" protocols, such as PSI-CA, PID, PMID, PSI-CA-SUM, and others.
- We create a new module
- common
- Previously, we place our own
log4j.properties
inresources
. However, this may reject developers to use its ownlog4j.properties
. We replace alllog4j.properties
frommain/resources
totest/resources
. - We optimize
LongUtils.ceilLog2
and some implementations inBigIntegerUtils
based on Guava.
- Previously, we place our own
mpc4j-common-tool
- We rename package
correlation
tometrics
so that we can include other metrics in that package. - We replace
RankUtils.java
with packageutil
. - We optimize implementations for the Hadamard matrix and the Hadamard coder.
- We rename package
mpc4j-s2pc-pso
- We move blackIP data from module
mpc4j-s2pc-pso
to the dictionarydata
. - We move PID and PMID from module
mpc4j-s2pc-pso
to modulempc4j-s2pc-pjc
.
- We move blackIP data from module
mpc4j-common-tool
- We fixed a bug in
RandomCoderUtils.java
, thanks Qixian Zhou for reporting.
- We fixed a bug in
mpc4j-common-tool
- Polynomial: We add batched polynomial implementation algorithms (both for Java and C/C++) introduced in the CRYPTO 2019 paper SpOT-Light: Lightweight Private Set Intersection from Sparse OT Extension .
- Ecc: We now support pure-Java Ristretto curve. We also support pure-Java Elliagtor encoding/decoding introduced in the CCS 2021 paper Compact and Malicious Private Set Intersection for Small Sets.
mpc4j-common-rpc
- We add the interface
PtoFactory
and make protocol factory classes implementPtoFactory
. - We add
setEnvType()
into the interfaceSecurePtoConfig
. All protocol config can supportsetEnvType()
so that we can switchEnvType.STANDARD
to others in a unified way.
- We add the interface
mpc4j-native-fhe
- We merged all native tools in one utils class for all protocols.
mpc4j-s2pc-pcg
- Multiplication Triple in Zp64: Introduce Multiplication Triple Generation (MTG) under Zp64 in
mpc4j-s2pc-pcg
.
- Multiplication Triple in Zp64: Introduce Multiplication Triple Generation (MTG) under Zp64 in
mpc4j-s2pc-pir
- Index PIR: We implemented XPIR proposed in the PETS 2022 paper XPIR : Private Information Retrieval for Everyone .
mpc4j-s2pc-pso
psu
- Now
Main
supports unbalanced PSU inputs. - Now
Main
supports BlackIP tests, recommended by anonymous USENIX Security 2023 reviewers.
- Now
- Documentations
- We update documentations for how to install and run
mpc4j
. Now, the documentation contains installingmpc4j
in Ubuntu and CentOS Docker images both foraarch64
andx86_64
.
- We update documentations for how to install and run
mpc4j-common-tool
- We revise the code for
SparseBitMatrix
. Now the code is easier to understand.
- We revise the code for
mpc4j-common-rpc
- Fix issue #5.
mpc4j-native-tool
- We thank anonymous USENIX Security 2023 Artifact Evaluation (AE) reviewers for many suggestions
for
mpc4j-native-tool
. These suggestions help us fix many memory leakage problems. Also, the comments help us remove many duplicate codes. Specifically, we replace constant-size heap allocations ( e.g.,auto *p = new uint8_t[]
) with stack allocations (e.g.,uint8_t p[]
). We fixed many memory leakage bugs in our C/C++ implementations. - We update
CMakeList.txt
so that one can successfully compilempc4j-native-tool
in Ubuntu and CentOS Docker images both foraarch64
andx86_64
.
- We thank anonymous USENIX Security 2023 Artifact Evaluation (AE) reviewers for many suggestions
for
mpc4j-common-tool
- ByteEcc: Add scalar validation for X25519. Add libsodium support for both X25519 and Ed25519.
- Kyber: Add post-quantum secure public key encryption scheme Kyber. The implementation is modified from KyberJCK.
mpc4j-s2pc-pcg
- Multiplication Triple in Zl: Introduce Multiplication Triple Generation (MTG) under Zl in
mpc4j-s2pc-pcg
. - Kyber Base-OT: Introduce Kyber Base-OT schemes.
- Multiplication Triple in Zl: Introduce Multiplication Triple Generation (MTG) under Zl in
mpc4j-s2pc-pso
- mqRPMT: Introduce mqRPMT.
- Facebook PID: Introduce the Facebook PID scheme based on X25519.
- PSI: Introduce EC-DH-PSI and KKRT16-PSI.
-
mpc4j-s2pc-pcg
-
$2^l$ -out-of-1 homomorphic oblivious transfer: We change$2^l$ -out-of-1 homomorphic oblivious transfer to core$2^l$ -out-of-1 oblivious transfer. In this way,$2^l$ -out-of-1 oblivious transfer implementations have the same style with 2-out-of-1 oblivious transfer implementations.
-
mpc4j-common-tool
byte[]
->int[]
: More tests show that the ByteBuffer conversion is as fast as unsafe conversion. We remove the unsafe conversion method. Now, developer can usempc4j
on any JDK with version 1.8 or later (instead of only 1.8).
mpc4j-s2pc-pcg
- n-out-of-1 oblivious transfer: We remove n-out-of-1 oblivious transfer since it seems useless in the current framework.
- CHANGELOG: We add CHANGELOG.md to write any changes during our development.
- UNSAFE: We find that
byte[]
toint[]
conversion dominates the cost for Silent OT. We addunsafeByteArrayToIntArray
inIntUtils
, and introduce such a method in our Silent OT implementation. - Ecc in OpenSSL: Ecc now supports OpenSSL. This means that we now have C/C++ SM2 implementation in
mpc4j
. - ByteEcc: We add
ByteMulEcc
andByteFullEcc
interface and its Ed25519 and X25519 implementations. The performance report shows that Ed25519 and X25519 are more efficient than the standard Ecc implementations but with some limitations. For example, X25519 only supports multiplication with specific scalars. - PropertiesUtils: We add
PropertiesUtils
inmpc4j-common-tool
for ease of usingProperties
. In addition, we refinemain
inmpc4j-s2pc-pso
andmpc4j-sml-opboost
.
- Fixed-Point Multiplication in ECC: In
mpc4j-common-tool
, we introduce the Window Method for ECC Fixed-Point Multiplication implemented in MCL into our pure-Java implementation, replacing the pre-computation techniques provided by Bouncy Castle. The efficiency results show that our new implementation is about 10x faster than the original one. - Multiplication Triple: In
mpc4j-s2pc-pcg
, we merge Boolean Triple Generation (BTG) packages into Multiplication Triple Generation (MTG) packages and renamebooleanTriple
toZ2Triple
, since BTG is a special case of MTG under the Z2 Field. - Distributed Punctured PRF: In
mpc4j-s2pc-pcg
, we define a new protocol named Distributed Punctured PRF (DPPRF), and move all related implementations into DPRRF. This helps remove repeating codes when using DPPRF to implement subfield VOLE, including Silent OT and$GF(2^{\kappa})$ -(sub)VOLE. - PMID in
mpc4j-s2pc-pso
supports multiset inputs for both parties. We further refine implementations for PMID protocols.
- Single Sparse-Point COT (
sspcot
): We removesspcot
in our Silent OT implementation since there is no usage inmpc4j
. We recommend developers usemspcot
instead. - Z2-VOLE: We find that Z2-VOLE is not secure and has no usage. We remove it from
mpc4j
.
- Ecc multiple init: We find a bug that if we first init the first native Ecc, then init the second native Ecc, and
finally use the first one, an error would arise. This is because we call
native.init
in the constructor, and the later constructor would overlap the previous status. We fix this bug by refining our ECC implementation. - APSI: There would be some unknown error when using
try_clear_irrelevant_bits
(provided by the original APSI implementation) to reduce communication costs. The error occurs with relatively low probability, around 0.8% in total tries. We remove it from our APSI implementation to ensure 100% correctness. - APSI: Add JNI memory release functions in
mpc4j-native-fhe/upsi/serialize.cpp
.
- Changelogs are for humans, not machines.
- There should be an entry for every single version.
- The same types of changes should be grouped.
- Versions and sections should be linkable.
- The latest version comes first.
- The release date of each version is displayed.
- Mention whether you follow Semantic Versioning.
Added
for new features.Changed
for changes in existing functionality.Deprecated
for soon-to-be removed features.Removed
for now removed features.Fixed
for any bug fixes.Security
in case of vulnerabilities.