Skip to content
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

Code to be corrected #681

Open
dsuponitskiy opened this issue Feb 27, 2024 · 0 comments
Open

Code to be corrected #681

dsuponitskiy opened this issue Feb 27, 2024 · 0 comments
Assignees
Labels
bug Something isn't working cleanup Code cleanup

Comments

@dsuponitskiy
Copy link
Collaborator

dsuponitskiy commented Feb 27, 2024

  1. src/binfhe/include/rgsw-cryptoparameters.h: in RingGSWCryptoParams()
    instead of "if ((method == LMKCDEY) & (numAutoKeys == 0))" there should be "if ((method == LMKCDEY) && (numAutoKeys == 0))"
  2. FindInVector() is defined in 2 different classes: DiscreteGaussianGeneratorImpl and in BaseSampler. The function return values differ by 1.
  3. src/pke/lib/encoding/packedencoding.cpp: bool PackedEncoding::Encode(): "size_t i;" is declared twice outside of the loop in this function. Should not be outside the corresponding loops
  4. - Add
    #include "math/hal/basicint.h" // for MAX_MODULUS_SIZE
    to constants.h and remove
    #include "math/math-hal.h"
    #include "lattice/constants-lattice.h"

    - Add #include "lattice/constants-lattice.h" to rlwe-cryptoparameters.h
  5. Replace "DCRTPoly" with "Element" in multiple files and discuss the changes with a scientist. Examples:
    src/pke/include/schemebase/base-parametergeneration.h
    src/pke/include/schemebase/base-leveledshe.h
    src/pke/include/schemebase/base-scheme.h
    src/pke/lib/schemebase/base-leveledshe.cpp
  6. Make ParamsGenBGVRNS(), ParamsGenCKKSRNS() and ParamsGenBFVRNS() non-virtual in base-scheme.h.
  7. utils/exception.h: make all get functions const for OpenFHEException
  8. Remove _MAKE_UNIQUE and make_unique from src/core/include/utils/memory.h and remove includes of memory.h where they are not needed
  9. Add "std::" to ceil(), floor(), log2(), pow(), sqrt() etc.
  10. src/pke/include/scheme/ckksrns/ckksrns-fhe.h:
    • Make both m_paramsEnc and m_paramsDec in CKKSBootstrapPrecom std::vector<unt32_t>. The current type is std::vector<int32_t>.
    • Make all data members of class CKKSBootstrapPrecom private
  11. Change the name COMPRESSION_LEVEL (constants.h) to Camel case
  12. Add either NOT_SET or INVALID_VALUE to all enums in constants.h
  13. See if we can replace the __builtin_*() functions with __FILE__, __LINE__ and __FUNCTION__ in OpenFHEException as the functions are available with gcc only - This can not be done as the macros are replaced with information from exception.h by the preprocessor at compile time.
  14. Remove the return value (eval_key_map) from EvalSumRowsKeyGen()/EvalSumColsKeyGen() and the EvalKey parameter from EvalSumRows()/EvalSumCols()
  15. Serialize/Deserialize functions should be "void" instead of returning true/false. Errors should be handled with exceptions
  16. Remove PublicKey from the parameter list #645
  17. Mark MATHBACKEND=2 deprecated #678
  18. Mark classes from "utils/exception.h" deprecated, so we can remove OPENFHE_THROW_OLD along with them. Is ThreadException used at all? #680
  19. Some suggestions #800
  20. Remove OPENFHE_THROW_OLD and all old exception types
  21. Rename the function member PrintValue() to GetFormattedValues() and move it simple implementation to PlaintextImpl "precision". Use it in operator<<(). The function should be overloaded in CKKSPackedEncoding only. Also check doprint(), PrintParameters() and print() (in src/pke/include/metadata.h). GetFormattedValues() should stay public in case someone needs to change the precision (like in openfhe-python).
  22. Replace sharingScheme types "additive" and "shamir" with enums
  23. Get rid of "int"
  24. zzz
@dsuponitskiy dsuponitskiy added bug Something isn't working cleanup Code cleanup labels Feb 27, 2024
@dsuponitskiy dsuponitskiy added this to the Release 1.2.0 milestone Feb 27, 2024
@dsuponitskiy dsuponitskiy changed the title Correct code Code to be corrected Jun 14, 2024
@yspolyakov yspolyakov modified the milestones: Release 1.4.0, Future Releases Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cleanup Code cleanup
Projects
None yet
Development

No branches or pull requests

3 participants