fhe-toolkit-linux icon indicating copy to clipboard operation
fhe-toolkit-linux copied to clipboard

Questions about the credit card fraud example

Open zhuoyw opened this issue 2 years ago • 2 comments

Feature description A clear description of your suggested or required feature.

Acceptance criteria

  1. Criteria to check that the feature is complete.
  2. Criteria to check that the feature is complete.

The readme says that "The full version of this library uses advanced techniques to keep all of these measures low...." and "The full version of this library uses advanced techniques to allow efficient, low latency".

What is "the full version of this library"? Is it a closed source version of HElib? Or is it a closed source version of the example that uses the open source version of HElib? Or is it a closed source version of ML-HELib?

Also I can't find this m (line 72): "adjusting the 'm' parameter (line 72)"

zhuoyw avatar Mar 04 '22 06:03 zhuoyw

Thank you very much for helping us to improve the quality of our software. The FHE Toolkit development team want to sincerely thank you for submitting your first issue and joining our technical community! We will get started on your issue immediately.

github-actions[bot] avatar Mar 04 '22 06:03 github-actions[bot]

Hi @zhuoyw,

Thank you for inquiring about this. I can hopefully answer your questions although it is a little convoluted. The easy question to answer is what happened to the variable m. The code had been refactored and this Readme was never updated. The var m has been moved into a struct called HelibConfig and you can now set it by a preset enum called HelibPreset. The choices are...

 /// An insecure, fast, 512 slots CKKS configuration
HELIB_NOT_SECURE_CKKS_512_FAST,

/// A CKKS configuration with 8192 slots
/// NOTE: Always verify the actual security matches requirements
HELIB_CKKS_8192,

/// A CKKS configuration with 16384 slots
/// Higher depth and higher precision allowing for heavier tasks.
/// NOTE: Always verify the actual security matches requirements
HELIB_CKKS_16384,

/// A CKKS configuration with 32768 slots
/// NOTE: Always verify the actual security matches requirements
 HELIB_CKKS_32768,

 /// An insecure, fast, 24 slots BGV configuration (integers)
 /// For integer numbers in the range 0...4998
HELIB_NOT_SECURE_BGV_24

And you can change it in this line here hePtr = HelibContext::create(HELIB_NOT_SECURE_CKKS_512_FAST);

as for your other question about the full version... I believe the full version of the library that the readme is referring to is called HElayers. This credit card fraud sample was pulled out of HElayers and was used to show how its possible to use HElib for secure AI inferencing. The full version, HElayers is not fully open source, however we do offer a pre-compiled binary, that is free for use, non-commercially. I encourage you to check it out, and try out the different demos for yourself. The link can be found here https://hub.docker.com/repository/docker/ibmcom/helayers-pylab for python, and https://hub.docker.com/repository/docker/ibmcom/helayers-lab for c++. There is also more info on the main Readme of this repo.

Please let me know if you need anything more

boland25 avatar Mar 04 '22 16:03 boland25