Skip to content

Update to v1.3.0 #988

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 46 commits into from
May 21, 2025
Merged

Update to v1.3.0 #988

merged 46 commits into from
May 21, 2025

Conversation

yspolyakov
Copy link
Contributor

No description provided.

fdiasmor and others added 30 commits January 14, 2025 14:51
* Initial commit: adding composite scaling parameters and scaling tech mode.

* Initial commit: adding composite scaling parameters and scaling tech mode.

* Some review changes.

* Update composite scaling unittests and fix unittest runtime issue.

* Move COMPOSITESCALING support error handling.

* Disable composite scaling set methods for non-CKKS schemes.

* Removing additional constructor that accepts composite scaling parameters.
…phase 2) (#929)

* Initial commit: adding composite scaling parameters and scaling tech mode.

* Initial commit: adding composite scaling parameters and scaling tech mode.

* Composite prime generation and adaptive scaling factors.

* Propagating composite degree to mod reduce calls.

* Handling overflow for scaling factors over 64 bits on composite scaling mode.

* Bug fix of overflow handling for d > 2 and sc > 64.

* Update impl of Rescale and Mod/LevelReduce methods with composite degree.

* Minor bug fix: else case missing.

* Update EvalPoly functions to use composite degree.

* Update Compress function to raise error.

* Update/Add new composite scaling examples.

* Recalculate sizeP and update EstimateLogP interface.

* Update composite-prime generation function.

* Remove comments from prime gen function.

* Update composite scaling unittests and fix unittest runtime issue.

* Some review changes.

* Update composite scaling unittests and fix unittest runtime issue.

* Disable composite scaling set methods for non-CKKS schemes.

* Move COMPOSITESCALING support error handling.

* Disable composite scaling set methods for non-CKKS schemes.

* Removing additional constructor that accepts composite scaling parameters.

* Review changes for PR 910 phase 2.

* Review updates and fixes.

* Review updates and fixes.

* Review updates and fixes.
* Initial commit: adding composite scaling parameters and scaling tech mode.

* Initial commit: adding composite scaling parameters and scaling tech mode.

* Composite prime generation and adaptive scaling factors.

* Propagating composite degree to mod reduce calls.

* Handling overflow for scaling factors over 64 bits on composite scaling mode.

* Bug fix of overflow handling for d > 2 and sc > 64.

* Update impl of Rescale and Mod/LevelReduce methods with composite degree.

* Minor bug fix: else case missing.

* Update EvalPoly functions to use composite degree.

* Update Compress function to raise error.

* Update/Add new composite scaling examples.

* Recalculate sizeP and update EstimateLogP interface.

* Updated CKKS bootstrapping for composite scaling with examples.

* Update error conditions.

* Update poly evaluation example.

* Tweak error condition regarding prime moduli size.

* Update composite-prime generation function.

* Remove comments from prime gen function.

* Update composite scaling unittests and fix unittest runtime issue.

* Some review changes.

* Update composite scaling unittests and fix unittest runtime issue.

* Disable composite scaling set methods for non-CKKS schemes.

* Move COMPOSITESCALING support error handling.

* Disable composite scaling set methods for non-CKKS schemes.

* Removing additional constructor that accepts composite scaling parameters.

* Review changes for PR 910 phase 2.

* Review updates and fixes.

* Review updates and fixes.

* Review updates and fixes.

* Update error message.

* Update error message.

* Code improvements

* Avoid infinite loop in next prime sampling.

* Fix decryption failed bug.

* Replace std::round(std::log2()) by std::frexp to get bit size of qDouble.

* Update error message.

* Code improvements

---------

Co-authored-by: Dmitriy Suponitskiy <[email protected]>
* Initial commit: adding composite scaling parameters and scaling tech mode.

* Initial commit: adding composite scaling parameters and scaling tech mode.

* Composite prime generation and adaptive scaling factors.

* Propagating composite degree to mod reduce calls.

* Handling overflow for scaling factors over 64 bits on composite scaling mode.

* Bug fix of overflow handling for d > 2 and sc > 64.

* Update impl of Rescale and Mod/LevelReduce methods with composite degree.

* Minor bug fix: else case missing.

* Update EvalPoly functions to use composite degree.

* Update Compress function to raise error.

* Update/Add new composite scaling examples.

* Recalculate sizeP and update EstimateLogP interface.

* Updated CKKS bootstrapping for composite scaling with examples.

* Update error conditions.

* Update poly evaluation example.

* Tweak error condition regarding prime moduli size.

* WIP: initial commit for composite scaling unittests

* Update composite scaling unittests and fix unittest runtime issue.

* add all test cases, testing remains

* Update test cases with appropriate parameter values.

* Update composite-prime generation function.

* Remove comments from prime gen function.

* Update composite scaling unittests and fix unittest runtime issue.

* Add composite scaling bootstrapping unittests.

* Some review changes.

* Fix bootstrap iterative unittest issue.

* Update composite scaling unittests and fix unittest runtime issue.

* Disable composite scaling set methods for non-CKKS schemes.

* Move COMPOSITESCALING support error handling.

* Disable composite scaling set methods for non-CKKS schemes.

* Removing additional constructor that accepts composite scaling parameters.

* Alternative way to calculate auxBits for composite scaling mode.

* Fix CI job run.

* Review changes for PR 910 phase 2.

* Review updates and fixes.

* Review updates and fixes.

* Review updates and fixes.

* Update error message.

* Update error message.

* Update poly 5 composite scaling ounit test param value.

* Code improvements

* Avoid infinite loop in next prime sampling.

* Fix decryption failed bug.

* Replace std::round(std::log2()) by std::frexp to get bit size of qDouble.

* Update error message.

* Code improvements

* Bug fix in prime generation.

* fixed a bug in GetElementForEvalAddOrSub for compositeDegree > 2 case

* Fix EvalAdd large double fails bug.

* Bug fix on  GetElementForEvalAddorSub: 64-bit overflow for obth operand * scFactor and scFactor

* Minor update to fix.

* Update composite scaling bootstrapping unit tests

* Remove commeted code from unittestutils.h.

* fix special modulus P generation in composite scaling & Add some comments on parameter generation

* Update EstimateLogP interface.

* Minor revision fix.

---------

Co-authored-by: gong-cr <[email protected]>
Co-authored-by: Dmitriy Suponitskiy <[email protected]>
Co-authored-by: Duhyeong Kim <[email protected]>
…aramsGenBGVRNS(), ParamsGenCKKSRNS() and ParamsGenBFVRNS() non-virtual in base-scheme.h (#903)

Co-authored-by: Dmitriy Suponitskiy <[email protected]>
* Removed unnecessary #include <iostream>

* For loop improvements

* Removal of obsolete code from utils/memory.h

* Corrected includes of constants-lattice.h

* Added includes of <ostream>

* Update matrix.h

* Update matrixstrassen.h

* Update serial.h

---------

Co-authored-by: Dmitriy Suponitskiy <[email protected]>
Co-authored-by: pascoec <[email protected]>
* Corrected operator== for the family of cryptoparameters classes

* Fixed syntax for multiple virtual functions, virtual destructors, made some print functions protected to force users to use operator<<(), fixed multiple issues, etc.

* Changes for additional print functions

---------

Co-authored-by: Dmitriy Suponitskiy <[email protected]>
…less than 32 if keySwitchTechnique == BV (BGV/BFV) (#912)

* Added a validation for the cryptocontext params: digitSize should be less than 32 if keySwitchTechnique == BV

* Use MAX_MODULUS_SIZE instead of hardcoded values

* Validate digitSize for all schemes, including CKKS

---------

Co-authored-by: Dmitriy Suponitskiy <[email protected]>
* Prevent integer overflow in FindAutomorphismIndex2nComplex()

* Optimized the modulus operation in FindAutomorphismIndex2nComplex()

---------

Co-authored-by: Dmitriy Suponitskiy <[email protected]>
* Restrict isPowerOfTwo() to unsigned integral types

* Restored the 'return' statement in IsPowerOfTwo()

---------

Co-authored-by: Dmitriy Suponitskiy <[email protected]>
…nctions to standardize the use of uint32_t (#923)

Co-authored-by: Dmitriy Suponitskiy <[email protected]>
* Refactored GetCollapsedFFTParams and SelectLayers(), added IsPowerOfTwo() to ReduceRotation(), some auxilliary changes

* Refactored CoeffDecodingCollapse()

* The scope of SelectLayers() is limited to ckksrns-utils.cpp only, some error handling, changes to GetCollapsedFFTParams() and Degree(), additional refactoring of CoeffDecodingCollapse()

* Some corrections to CoeffEncodingCollapse()

* Added some cast, replaced multiple calculations of std::log2(slots) in CoeffEncodingOneLevel() and CoeffDecodingOneLevel() with a variable, improvements to CoeffEncodingCollapse()

* Finished refactoring CoeffEncodingCollapse()

---------

Co-authored-by: Dmitriy Suponitskiy <[email protected]>
… BGV mutable operations (#934)

Co-authored-by: Dmitriy Suponitskiy <[email protected]>
…ns to pke/unittest as it is a collection of special utilities (#916)

* Moved schemeswitching-data-serializer.h from pke/include/scheme/ckksrns to pke/unittest as it is a collection of special utilities

* Addressed code review comments

---------

Co-authored-by: Dmitriy Suponitskiy <[email protected]>
* udates to SwitchModulus

* updates to ApproxSwitchCRTBasis and FastExpandCRTBasisPloverQ

* add WITH_REDUCED_NOISE flag as OpenFHE CMake options; reformat CMake files

* add LazySwitchModulus() functionality

* add MultAccEqNoCheck() functionality

* further updates to ApproxSwitchCRTBasis()

* fix for BE6

* updates to HKS and BFV HPSPOVERQ noise estimation
* First cut of std thread mutual exclusion

* distributiongenerator thread mutual exclusion

* Diagnostic output for Precompute phases.

* revert to minimal implementation that works under std::thread, with proper single-threaded initialization

* remove lazy precompute map searches

* Control the usage of C++ threads for PRNG from CMakeLists.txt

* Restored lazy precompute map searches

---------

Co-authored-by: Jack Bates <[email protected]>
Co-authored-by: Dmitriy Suponitskiy <[email protected]>
* fix for intt if ringdm is 2

* unittest for intt if ringdm is 2
* initial version of 2-party interactive CKKS bootstrapping - compiles - still debugging the correctness

* fixed FLEXIBLEAUTOEXT

* added unit test example

* Code corrections

* Added unit tests and removed obsolete examples for interactive 2party bootstrapping

* Disable the new interactive 2party bottstrapping unittests for 128-bit

* clean up the example for interactive bootstrapping

* Corrected clang-18 errors for MB6

---------

Co-authored-by: Yuriy Polyakov <[email protected]>
Co-authored-by: Dmitriy Suponitskiy <[email protected]>
* Cleartext version of EvalChebyshevFunction

* updating the comments

---------

Co-authored-by: Shai Halevi <[email protected]>
Co-authored-by: Yuriy Polyakov <[email protected]>
dsuponitskiy and others added 15 commits April 10, 2025 18:01
… BINFHE_PARAMSET are compatible within GenerateBinFHEContext() (#966)
* Fix decryption/decoding error for N>>65k on COMPOSITESCALING.

* Tighten prime selection to register size and update error message.

* Commet out debugging message from throw.

* Disallow invalid use of composite degree values.

* Shorter composite scaling prime sampling error message.

* Fix dangling literal issue.
* Fix decryption/decoding error for N>>65k on COMPOSITESCALING.

* Tighten prime selection to register size and update error message.

* Add example demonstrating COMPOSITESCALINGMANUAL usage.

* Add COMPOSITESCALINGMANUAL unit tests.

* Renaming composite scaling bootstrapping unit test file.

Signed-off-by: Souza, Fillipe <[email protected]>

* Minor update.

* Commet out debugging message from throw.

* Reformating test case entries.

* Disallow invalid use of composite degree values.

* Shorter composite scaling prime sampling error message.

* Remove composite degree comments in unit tests.

* Fix dangling literal issue.

* Validate scalingModSize for COMPOSITESCALING.

* Add single definitions of COMPOSITESCALING_MAX_MODULUS_SIZE.

---------

Signed-off-by: Souza, Fillipe <[email protected]>
* initial commit for complex numbers, no serialization

* added complex operations by constants

* fixed serialization and added unit tests

* fixed for 128 bits

* some cleanup

* Update gen-cryptocontext-bfvrns-params.h

* Update gen-cryptocontext-bgvrns-params.h

* plaintext constructor

* minor fix for clang

* updates

* bug fix for scaling factor too small

* fix for CI compilation error

* logc = std::numeric_limits<int32_t>::min() rather than -1

* Adjusting location of CKKSDataType in test cases files (composite scaling compliance).

---------

Co-authored-by: pascoec <[email protected]>
Co-authored-by: Carlo Pascoe <[email protected]>
Co-authored-by: Souza, Fillipe <[email protected]>
* Initial changes to add missing parameters to CryptoContext.

* Added EvalMultInPlace() for CKKS and BGV

* Added missing parameter values to CryptoParametersRLWE

---------

Co-authored-by: Dmitriy Suponitskiy <[email protected]>
* updated the documentation for cryptocontextgen parameter generation

* minor fix

* Update contributors.rst

* updated documentation in examples directory

* updated documentation for interactive bootstrapping

* documentation and touchup changes related to CKKS composite scaling

* reverted GetBootstrap change

---------

Co-authored-by: Yuriy Polyakov <[email protected]>
…etc. (#973)

* Multiple fixes in comments, replaced usint with uint32_t

* Comments updates

* Comments updates (2)

* Comments updates (3)

* Comments updates (3)

* Comments updates (4)

* Comments updates (5)

* Update cryptocontext.h

---------

Co-authored-by: Dmitriy Suponitskiy <[email protected]>
Co-authored-by: pascoec <[email protected]>
…ed with clang++-18 and running on MacOS (#975)

Co-authored-by: Dmitriy Suponitskiy <[email protected]>
* fixed a bug in iterative CKKS boot example for CS

* typo

* updated the documentation for CKKS composting scaling

* more documentation updates

* fixed EvalMultInPlace

* Update composite scaling constraints.

* updated the documentation

* Corrected a unit test, some code cleanup and organization

* Addressed review comments

---------

Co-authored-by: Yuriy Polyakov <[email protected]>
Co-authored-by: Souza, Fillipe <[email protected]>
Co-authored-by: Dmitriy Suponitskiy <[email protected]>
* documented TODOs

* fixed the bug with compositedegree = 1

* moved the RNS basis extension for CKKS bootstrapping to a separate function

---------

Co-authored-by: Yuriy Polyakov <[email protected]>
* Fixed const ConstCiphertext

* Fixed const ConstPlaintext

---------

Co-authored-by: Dmitriy Suponitskiy <[email protected]>
* initial emscripten fixes

* Disabled some unit tests for Emscripten

* Removed redundant __EMSCRIPTEN__

* Additional __EMSCRIPTEN__ removal

* Correction for NATIVEINT

* Clang-20 compiler error fix

* Update utilities.h

* Update UnitTestCKKSrns.cpp

* Update UnitTestInteractiveBootstrap.cpp

* Update UnitTestCKKSrnsSerialize.cpp

* Update utilities.h

---------

Co-authored-by: Yuriy Polyakov <[email protected]>
Co-authored-by: Dmitriy Suponitskiy <[email protected]>
Co-authored-by: pascoec <[email protected]>
* added release notes and related changes

* updated release notes

* updated the main README file

* minor documentation change

* updated the year in copyrights

---------

Co-authored-by: Yuriy Polyakov <[email protected]>
@yspolyakov yspolyakov added this to the Release 1.3.0 milestone May 21, 2025
@yspolyakov yspolyakov added the new release new release label May 21, 2025
@yspolyakov yspolyakov merged commit 02a8e9c into main May 21, 2025
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new release new release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants