Skip to content

Instantly share code, notes, and snippets.

@asraa
Last active August 1, 2024 18:20
Show Gist options
  • Save asraa/6105c144aa10295aa4f021438d5b046d to your computer and use it in GitHub Desktop.
Save asraa/6105c144aa10295aa4f021438d5b046d to your computer and use it in GitHub Desktop.
LWE and RLWE types

Attributes

Application Data Info Attribute

  • underlying message data type? i1, i32, f32
  • any other semantic info?
  • precision?

Plaintext Encoding Info

  • plaintext modulus p
  • delta for scaling factor?
  • OLD TFHE: shift info?
  • encoding type:
    • constant_coefficient_encoding
    • trivial_coefficient_packing
    • digitwise_coefficient_packing
    • crt_packing
    • inverse_canonical_embedding_encoding

Key Info Attributes

  • key identifier
  • key basis

Encryption Info Attributes

  • Ciphertext modulus q
  • MSB/LSB/mixed (use q & p to calculate encryption)

Modulus chain info attr

  • moduli_chain
  • current modulus
  • modulus switching info? (is key ID enough?)

Types

LWE Plaintext:

  • Application Data Info Attribute
  • Plaintext Encoding Info
    • encoding type must be constant_coefficient_encoding (sort of implicit)

LWE Ciphertext:

  • Application Data Info Attribute
  • Plaintext Encoding Info
    • encoding type must be constant_coefficient_encoding (sort of implicit)
  • Key info attribute
  • Encryption info attribute

RLWE Plaintext:

  • Ring info
  • Application Data Info Attribute
  • Plaintext Encoding Info

RLWE Ciphertext:

  • Ring information
  • rlwe dimension/size: default 2
  • Application Data Info Attribute
  • Plaintext Encoding Info
  • Key info attributes
  • Encryption attributes
  • Modulus chain info
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment