binfhecontext_docs.h 2.5 KB

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