Skip to content

Support msvc and others#4

Merged
juny2400 merged 8 commits intomainfrom
support-msvc-and-others
Mar 13, 2026
Merged

Support msvc and others#4
juny2400 merged 8 commits intomainfrom
support-msvc-and-others

Conversation

@juny2400
Copy link
Contributor

Newly supported features:

  1. MSVC build and options.
  2. Secretkey(or sensitive data) zeroization.
  3. Custom random sampler. (ex. sodium/blake3)
  4. Preset template objects. (Encryptor / Decryptor / KeyGenerator)

@juny2400 juny2400 requested a review from a team March 12, 2026 07:24
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors a CKKS homomorphic encryption library to support MSVC builds, adds secret key zeroization, introduces a custom random sampler interface (with sodium/blake3 examples), and creates preset template objects for Encryptor/Decryptor/KeyGenerator. The Context class is replaced with direct preset accessor functions and PresetTraits.

Changes:

  • Replaced the Context shared-pointer indirection with direct get_*() preset accessor functions and compile-time PresetTraits, removing Context.hpp entirely.
  • Added SecretKey::zeroize() for secure memory clearing with multiple backend options (libsodium, OpenSSL, native, fallback), and a RandomGenerator abstraction with factory pattern for pluggable RNG.
  • Added MSVC 128-bit integer emulation (u128/i128 structs), float-precision message types (FMessage/FCoeffMessage), and Windows CI support.

Reviewed changes

Copilot reviewed 66 out of 66 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
include/deb/utils/Basic.hpp MSVC u128/i128 emulation, subIfGEConst
include/deb/utils/Macro.hpp deb_secure_zero inline function, platform detection
include/deb/utils/RandomGenerator.hpp New abstract RNG interface and factory
include/deb/utils/AleaRandomGenerator.hpp Alea-backed RNG implementation
include/deb/utils/PresetTraits.hpp Compile-time preset traits with ModArith
include/deb/utils/OmpUtils.hpp OMP utils moved to deb::utils namespace
include/deb/utils/FFT.hpp Non-template FFT class with template methods
include/deb/utils/ModArith.hpp Templatized ModArith on degree
include/deb/utils/Constant.hpp Moved to deb::utils namespace
include/deb/Preset.hpp New preset variant map and accessor functions
include/deb/CKKSTypes.hpp Float message types, removed Context dependency, inline accessors
include/deb/Encryptor.hpp Template class EncryptorT<P>
include/deb/Decryptor.hpp Template class DecryptorT<P>
include/deb/Serialize.hpp FMessage/FCoeffMessage serialization support
include/deb/SeedGenerator.hpp Uses RandomGenerator instead of alea directly
include/deb/SecretKeyGenerator.hpp Removed Context dependency
include/deb/Context.hpp Deleted
include/deb/utils/Span.hpp Deleted
src/*.cpp Updated to use preset accessors, new RNG, zeroization
test/*.cpp Updated tests for new APIs, added float and operation tests
examples/*.cpp Updated for new API, added CustomRNG example
benchmark/*.cpp Updated benchmarks, added blake3 RNG benchmark
CMakeLists.txt MSVC support, secure zero options, version bump to 0.3.0
CMakePresets.json Added ci-win preset
.github/workflows/main.yml Added Windows CI
Comments suppressed due to low confidence (1)

include/deb/utils/Macro.hpp:180

  • Spelling error: "seted" should be "set".

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@juny2400 juny2400 merged commit d1ba816 into main Mar 13, 2026
4 checks passed
@juny2400 juny2400 deleted the support-msvc-and-others branch March 13, 2026 05:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants