binfhecontext_docs.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. #ifndef BINFHECONTEXT_DOCSTRINGS_H
  2. #define BINFHECONTEXT_DOCSTRINGS_H
  3. // GenerateBinFHEContext
  4. const char* binfhe_GenerateBinFHEContext_parset_docs = R"pbdoc(
  5. Creates a crypto context using predefined parameter sets. Recommended for most users.
  6. :param set: The parameter set: TOY, MEDIUM, STD128, STD192, STD256.
  7. :type set: BINFHE_PARAMSET
  8. :param method: The bootstrapping method (DM or CGGI).
  9. :type method: BINFHE_METHOD
  10. :return: The created crypto context.
  11. :rtype: BinFHEContext
  12. )pbdoc";
  13. // KeyGen
  14. const char* binfhe_KeyGen_docs = R"pbdoc(
  15. Generates a secret key for the main LWE scheme.
  16. :return: The secret key.
  17. :rtype: LWEPrivateKey
  18. )pbdoc";
  19. // BTKeyGen
  20. const char* binfhe_BTKeyGen_docs = R"pbdoc(
  21. Generates bootstrapping keys.
  22. :param sk: The secret key.
  23. :type sk: LWEPrivateKey
  24. )pbdoc";
  25. // Encrypt
  26. const char* binfhe_Encrypt_docs = R"pbdoc(
  27. Encrypts a bit using a secret key (symmetric key encryption).
  28. :param sk: The secret key.
  29. :type sk: LWEPrivateKey
  30. :param m: The plaintext.
  31. :type m: int
  32. :param output: FRESH to generate a fresh ciphertext, BOOTSTRAPPED to generate a refreshed ciphertext (default).
  33. :type output: BINFHE_OUTPUT
  34. :param p: Plaintext modulus (default 4).
  35. :type p: int
  36. :param mod: Encrypt according to mod instead of m_q if mod != 0.
  37. :type mod: int
  38. :return: The ciphertext.
  39. :rtype: LWECiphertext
  40. )pbdoc";
  41. // Decrypt
  42. const char* binfhe_Decrypt_docs = R"pbdoc(
  43. Decrypts a ciphertext using a secret key.
  44. :param sk: The secret key.
  45. :type sk: LWEPrivateKey
  46. :param ct: The ciphertext.
  47. :type ct: LWECiphertext
  48. :param p: Plaintext modulus (default 4).
  49. :type p: int
  50. :return: The plaintext.
  51. :rtype: int
  52. )pbdoc";
  53. // EvalBinGate
  54. const char* binfhe_EvalBinGate_docs = R"pbdoc(
  55. Evaluates a binary gate (calls bootstrapping as a subroutine).
  56. :param gate: The gate; can be AND, OR, NAND, NOR, XOR, or XNOR.
  57. :type gate: BINGATE
  58. :param ct1: First ciphertext.
  59. :type ct1: LWECiphertext
  60. :param ct2: Second ciphertext.
  61. :type ct2: LWECiphertext
  62. :return: The resulting ciphertext.
  63. :rtype: LWECiphertext
  64. )pbdoc";
  65. // EvalNOT
  66. const char* binfhe_EvalNOT_docs = R"pbdoc(
  67. Evaluates the NOT gate.
  68. :param ct: The input ciphertext.
  69. :type ct: LWECiphertext
  70. :return: The resulting ciphertext.
  71. :rtype: LWECiphertext
  72. )pbdoc";
  73. #endif // BINFHECONTEXT_DOCSTRINGS_H