binfhecontext_docs.h 2.3 KB

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