homomorphic sim 2 d operations
play

Homomorphic SIM 2 D operations: Single Instruction Much More Data - PowerPoint PPT Presentation

Homomorphic SIM 2 D operations: Single Instruction Much More Data Wouter Castryck Ilia Iliashenko Frederik Vercauteren Homomorphic encryption cryp 175.2 {#*| Homomorphic encoding real-world data plaintext ciphertext


  1. Homomorphic SIM 2 D operations: Single Instruction Much More Data Wouter Castryck Ilia Iliashenko Frederik Vercauteren

  2. Homomorphic encryption ๐ท ๐ท cryp 175.2 ยงรง{ร #ยฃ*ยฐ|

  3. Homomorphic encoding real-world data plaintext ciphertext ๐ท ๐ท ๐ท cryp 2๐‘ฆ 1023 + ๐‘ฆ 2 + 7๐‘ฆ + 5 175.2 ยงรง{ร #ยฃ*ยฐ|

  4. Plaintext space ๐š[๐‘ฆ] Typically a ring of the form ๐‘† ๐‘ข = (๐‘” ๐‘ฆ , ๐‘ข) where ๐‘ข โˆˆ ๐š โ‰ฅ2 and ๐‘” ๐‘ฆ โˆˆ ๐š[๐‘ฆ] is monic irreducible of degree ๐‘’ . We represent this by a box: ๐‘๐‘ฆ ๐‘— ๐‘ ๐‘ข -direction Polynomials of degree < ๐‘’ ๐‘— and coefficients in [0, ๐‘ข) . ๐‘’ -direction

  5. ๐‘’ -direction Homomorphic encoding ๐‘ข -direction How to encode real-world input ๐œ„ ? General principle: find an integer-digit expansion ๐œ„ โ‰ˆ ๐‘ ๐‘  ๐‘ ๐‘  + ๐‘ ๐‘ โˆ’1 ๐‘ ๐‘ โˆ’1 + โ‹ฏ + ๐‘ 1 ๐‘ + ๐‘ 0 for some base ๐‘ โˆˆ ๐ƒ . Then encode as ๐‘ ๐‘  ๐‘ฆ ๐‘  + ๐‘ ๐‘ โˆ’1 ๐‘ฆ ๐‘ โˆ’1 + โ‹ฏ + ๐‘ 1 ๐‘ฆ + ๐‘ 0 . Decoding: evaluate in ๐‘ฆ = ๐‘ . Works well if no overflow .

  6. ๐‘’ -direction Homomorphic encoding ๐‘ข -direction How to encode real-world input ๐œ„ ? General principle: find an integer-digit expansion ๐œพ = ๐Ÿ‘ ๐Ÿ• + ๐Ÿ‘ ๐Ÿ“ + ๐Ÿ‘ ๐Ÿ’ + ๐Ÿ‘ + ๐Ÿ ๐œ„ โ‰ˆ ๐‘ ๐‘  ๐‘ ๐‘  + ๐‘ ๐‘ โˆ’1 ๐‘ ๐‘ โˆ’1 + โ‹ฏ + ๐‘ 1 ๐‘ + ๐‘ 0 for some base ๐‘ โˆˆ ๐ƒ . Then encode as ๐‘ ๐‘  ๐‘ฆ ๐‘  + ๐‘ ๐‘ โˆ’1 ๐‘ฆ ๐‘ โˆ’1 + โ‹ฏ + ๐‘ 1 ๐‘ฆ + ๐‘ 0 . Decoding: evaluate in ๐‘ฆ = ๐‘ . Works well if no overflow .

  7. ๐‘’ -direction Homomorphic encoding ๐‘ข -direction How to encode real-world input ๐œ„ ? General principle: find an integer-digit expansion ๐œพ = ๐Ÿ‘ ๐Ÿ• + ๐Ÿ‘ ๐Ÿ“ + ๐Ÿ‘ ๐Ÿ’ + ๐Ÿ‘ + ๐Ÿ ๐œ„ โ‰ˆ ๐‘ ๐‘  ๐‘ ๐‘  + ๐‘ ๐‘ โˆ’1 ๐‘ ๐‘ โˆ’1 + โ‹ฏ + ๐‘ 1 ๐‘ + ๐‘ 0 for some base ๐‘ โˆˆ ๐ƒ . Then encode as ๐‘ ๐‘  ๐‘ฆ ๐‘  + ๐‘ ๐‘ โˆ’1 ๐‘ฆ ๐‘ โˆ’1 + โ‹ฏ + ๐‘ 1 ๐‘ฆ + ๐‘ 0 . Decoding: evaluate in ๐‘ฆ = ๐‘ . Works well if no overflow .

  8. ๐‘’ -direction Homomorphic encoding ๐‘ข -direction How to encode real-world input ๐œ„ ? General principle: find an integer-digit expansion ๐œพ = ๐Ÿ‘ ๐Ÿ• + ๐Ÿ‘ ๐Ÿ“ + ๐Ÿ‘ ๐Ÿ’ + ๐Ÿ‘ + ๐Ÿ ๐œ„ โ‰ˆ ๐‘ ๐‘  ๐‘ ๐‘  + ๐‘ ๐‘ โˆ’1 ๐‘ ๐‘ โˆ’1 + โ‹ฏ + ๐‘ 1 ๐‘ + ๐‘ 0 for some base ๐‘ โˆˆ ๐ƒ . Then encode as ๐‘ ๐‘  ๐‘ฆ ๐‘  + ๐‘ ๐‘ โˆ’1 ๐‘ฆ ๐‘ โˆ’1 + โ‹ฏ + ๐‘ 1 ๐‘ฆ + ๐‘ 0 . Decoding: evaluate in ๐‘ฆ = ๐‘ . Works well if no overflow .

  9. ๐‘’ -direction Homomorphic encoding ๐‘ข -direction How to encode real-world input ๐œ„ ? General principle: find an integer-digit expansion ๐œพ = ๐Ÿ‘ ๐Ÿ• + ๐Ÿ‘ ๐Ÿ“ + ๐Ÿ‘ ๐Ÿ’ + ๐Ÿ‘ + ๐Ÿ ๐œ„ โ‰ˆ ๐‘ ๐‘  ๐‘ ๐‘  + ๐‘ ๐‘ โˆ’1 ๐‘ ๐‘ โˆ’1 + โ‹ฏ + ๐‘ 1 ๐‘ + ๐‘ 0 for some base ๐‘ โˆˆ ๐ƒ . Then encode as ๐‘ ๐‘  ๐‘ฆ ๐‘  + ๐‘ ๐‘ โˆ’1 ๐‘ฆ ๐‘ โˆ’1 + โ‹ฏ + ๐‘ 1 ๐‘ฆ + ๐‘ 0 . Decoding: evaluate in ๐‘ฆ = ๐‘ . Works well if no overflow .

  10. Fractional encoding Encoding fractional expansions ๐œ„ โ‰ˆ ๐‘ ๐‘  ๐‘ ๐‘  + โ‹ฏ + ๐‘ 1 ๐‘ + ๐‘ 0 + ๐‘ โˆ’1 ๐‘ โˆ’1 + โ‹ฏ + ๐‘ โˆ’๐‘ก ๐‘ โˆ’๐‘ก ? If ๐‘”(๐‘ฆ) = ๐‘ฆ ๐‘’ + 1 then ๐‘ฆ โˆ’๐‘— โ‰ก โˆ’๐‘ฆ ๐‘’โˆ’๐‘— , so: [Dowlin et al., โ€˜15] put fractional part at the high powers, with negated sign. ๐œพ = ๐Ÿ‘ ๐Ÿ• + ๐Ÿ‘ ๐Ÿ“ + ๐Ÿ‘ ๐Ÿ’ + ๐Ÿ‘ + ๐Ÿ + ๐Ÿ‘ โˆ’๐Ÿ + ๐Ÿ‘ โˆ’๐Ÿ’ ๐‘ข -direction Works as long as high powers ๐‘’ -direction and low powers do not overflow each other.

  11. Fractional encoding Encoding fractional expansions ๐œ„ โ‰ˆ ๐‘ ๐‘  ๐‘ ๐‘  + โ‹ฏ + ๐‘ 1 ๐‘ + ๐‘ 0 + ๐‘ โˆ’1 ๐‘ โˆ’1 + โ‹ฏ + ๐‘ โˆ’๐‘ก ๐‘ โˆ’๐‘ก ? If ๐‘”(๐‘ฆ) = ๐‘ฆ ๐‘’ + 1 then ๐‘ฆ โˆ’๐‘— โ‰ก โˆ’๐‘ฆ ๐‘’โˆ’๐‘— , so: [Dowlin et al., โ€˜15] put fractional part at the high powers, with negated sign. ๐œพ = ๐Ÿ‘ ๐Ÿ• + ๐Ÿ‘ ๐Ÿ“ + ๐Ÿ‘ ๐Ÿ’ + ๐Ÿ‘ + ๐Ÿ + ๐Ÿ‘ โˆ’๐Ÿ + ๐Ÿ‘ โˆ’๐Ÿ’ ๐‘ข -direction Works as long as high powers ๐‘’ -direction and low powers do not overflow each other.

  12. Fractional encoding Encoding fractional expansions ๐œ„ โ‰ˆ ๐‘ ๐‘  ๐‘ ๐‘  + โ‹ฏ + ๐‘ 1 ๐‘ + ๐‘ 0 + ๐‘ โˆ’1 ๐‘ โˆ’1 + โ‹ฏ + ๐‘ โˆ’๐‘ก ๐‘ โˆ’๐‘ก ? If ๐‘”(๐‘ฆ) = ๐‘ฆ ๐‘’ + 1 then ๐‘ฆ โˆ’๐‘— โ‰ก โˆ’๐‘ฆ ๐‘’โˆ’๐‘— , so: [Dowlin et al., โ€˜15] put fractional part at the high powers, with negated sign. ๐œพ = ๐Ÿ‘ ๐Ÿ• + ๐Ÿ‘ ๐Ÿ“ + ๐Ÿ‘ ๐Ÿ’ + ๐Ÿ‘ + ๐Ÿ + ๐Ÿ‘ โˆ’๐Ÿ + ๐Ÿ‘ โˆ’๐Ÿ’ ๐‘ข -direction Works as long as high powers ๐‘’ -direction and low powers do not overflow each other.

  13. SIMD

  14. SIMD

  15. SIMD

  16. SIMD Batch encoding is possible thanks to CRT [Smart- Vercauteren, โ€˜14] : ๐š[๐‘ฆ] ๐š[๐‘ฆ] ๐š[๐‘ฆ] ๐š ๐‘ฆ โ‰… ๐‘† ๐‘ข = (๐‘” ๐‘ฆ , ๐‘ข) ีœ 1 ๐‘ฆ , ๐‘ข) ร— 2 ๐‘ฆ , ๐‘ข) ร— โ‹ฏ ร— (๐‘” (๐‘” ๐‘” ๐‘  ๐‘ฆ , ๐‘ข where the ๐‘” ๐‘— (๐‘ฆ) are coprime factors of ๐‘” ๐‘ฆ modulo ๐‘ข .

  17. SIMD Batch encoding is possible thanks to CRT [Smart- Vercauteren, โ€˜14] : ๐š[๐‘ฆ] ๐š[๐‘ฆ] ๐š[๐‘ฆ] ๐š ๐‘ฆ โ‰… ๐‘† ๐‘ข = (๐‘” ๐‘ฆ , ๐‘ข) ีœ 1 ๐‘ฆ , ๐‘ข) ร— 2 ๐‘ฆ , ๐‘ข) ร— โ‹ฏ ร— (๐‘” (๐‘” ๐‘” ๐‘  ๐‘ฆ , ๐‘ข where the ๐‘” ๐‘— (๐‘ฆ) are coprime factors of ๐‘” ๐‘ฆ modulo ๐‘ข .

  18. SIMD Batch encoding is possible thanks to CRT [Smart- Vercauteren, โ€˜14] : ๐š[๐‘ฆ] ๐š[๐‘ฆ] ๐š[๐‘ฆ] ๐š ๐‘ฆ โ‰… ๐‘† ๐‘ข = (๐‘” ๐‘ฆ , ๐‘ข) ีœ 1 ๐‘ฆ , ๐‘ข) ร— 2 ๐‘ฆ , ๐‘ข) ร— โ‹ฏ ร— (๐‘” (๐‘” ๐‘” ๐‘  ๐‘ฆ , ๐‘ข where the ๐‘” ๐‘— (๐‘ฆ) are coprime factors of ๐‘” ๐‘ฆ modulo ๐‘ข .

  19. SIMD Batch encoding is possible thanks to CRT [Smart- Vercauteren, โ€˜14] : ๐š[๐‘ฆ] ๐š[๐‘ฆ] ๐š[๐‘ฆ] ๐š ๐‘ฆ โ‰… ๐‘† ๐‘ข = (๐‘” ๐‘ฆ , ๐‘ข) ีœ 1 ๐‘ฆ , ๐‘ข) ร— 2 ๐‘ฆ , ๐‘ข) ร— โ‹ฏ ร— (๐‘” (๐‘” ๐‘” ๐‘  ๐‘ฆ , ๐‘ข where the ๐‘” ๐‘— (๐‘ฆ) are coprime factors of ๐‘” ๐‘ฆ modulo ๐‘ข .

  20. SIMD ๐ท cryp SIMD i Single Instruction, Multiple Data Batch encoding is possible thanks to CRT [Smart- Vercauteren, โ€˜14] : ๐š[๐‘ฆ] ๐š[๐‘ฆ] ๐š[๐‘ฆ] ๐š ๐‘ฆ โ‰… ๐‘† ๐‘ข = (๐‘” ๐‘ฆ , ๐‘ข) ีœ 1 ๐‘ฆ , ๐‘ข) ร— 2 ๐‘ฆ , ๐‘ข) ร— โ‹ฏ ร— (๐‘” (๐‘” ๐‘” ๐‘  ๐‘ฆ , ๐‘ข where the ๐‘” ๐‘— (๐‘ฆ) are coprime factors of ๐‘” ๐‘ฆ modulo ๐‘ข .

  21. Contributions ๏ƒ˜ SIMD seems incompatible with fractional encoding, because most factors of ๐‘ฆ ๐‘’ + 1 modulo ๐‘ข are not of that form. We give a very general fractional encoding method which does not require that ๐’ˆ ๐’š = ๐’š ๐’† + ๐Ÿ . ๏ƒ˜ The CRT allows for more fine-grained decompositions by also incorporating factorizations of ๐‘ข . We show that this enables more flexible and denser data packing.

  22. Fractional encoding revisited Write ๐‘” ๐‘ฆ = ๐‘ฆ โ‹… ๐‘• ๐‘ฆ + ๐‘” 0 . First encode ๐‘ ๐‘  ๐‘ ๐‘  + โ‹ฏ + ๐‘ 1 ๐‘ + ๐‘ 0 + ๐‘ โˆ’1 ๐‘ โˆ’1 + โ‹ฏ + ๐‘ โˆ’๐‘ก ๐‘ โˆ’๐‘ก as a Laurent polynomial in ๐š[๐‘ฆ ยฑ1 ] by substituting ๐‘ฆ for ๐‘ .

  23. Fractional encoding revisited mild requirement: Write ๐‘” ๐‘ฆ = ๐‘ฆ โ‹… ๐‘• ๐‘ฆ + ๐‘” 0 . ๐’ˆ(๐Ÿ) invertible mod ๐’– First encode ๐‘ ๐‘  ๐‘ฆ ๐‘  + โ‹ฏ + ๐‘ 1 ๐‘ฆ + ๐‘ 0 + ๐‘ โˆ’1 ๐‘ฆ โˆ’1 + โ‹ฏ + ๐‘ โˆ’๐‘ก ๐‘ฆ โˆ’๐‘ก as a Laurent polynomial in ๐š[๐‘ฆ ยฑ1 ] by substituting ๐‘ฆ for ๐‘ . Then apply: mod ๐‘ข ๐š ๐‘ข ๐‘ฆ ยฑ1 ๐‘ฆ โ†ฆ ๐‘ฆ ๐œƒ ๐‘” ๐š ๐‘ฆ ยฑ1 ๐‘† ๐‘ข where ๐œƒ ๐‘” : แ‰Š ๐‘ฆ โˆ’1 โ†ฆ โˆ’๐‘” 0 โˆ’1 ๐‘•(๐‘ฆ)

  24. Decoding Visually: looks like a mess, ๐‘ข -direction seems to overflow from the start! ๐‘’ -direction

  25. Decoding Visually: looks like a mess, ๐‘ข -direction seems to overflow from the start! ๐‘’ -direction

  26. Decoding Visually: looks like a mess, ๐‘ข -direction seems to overflow from the start! Algebraically, much cleaner. ๐‘’ -direction If ๐‘› โˆ’ โ„“ + 1 = ๐‘’ then the restricted map ๐œƒ ๐‘” โ‰ค๐‘› ๐š ๐‘ข ๐‘ฆ ยฑ1 ๐‘† ๐‘ข โ‰ฅโ„“ is an isomorphism of free ๐š ๐‘ข -modules of rank ๐‘’ .

  27. Bounding box Suppose we know that the evaluation of ๐ท when carried out in ๐š[๐‘ฆ ยฑ1 ] ends up in a certain box , and that some shifted plaintext space covers this box . ๐š -axis height ๐‘ข ๐‘› โ„“ ๐‘ฆ -axis width ๐‘› โˆ’ โ„“ + 1 = ๐‘’ โ‰ค๐‘› mod ๐‘ข ๐š ๐‘ข ๐‘ฆ ยฑ1 ๐œƒ ๐‘” โ‰ค๐‘› ๐š ๐‘ฆ ยฑ1 ๐‘† ๐‘ข . Decoding = inverting โ‰ฅโ„“ โ‰ฅโ„“

  28. Decomposing plaintext space The CRT decomposition used in [Smart- Vercauteren, โ€˜14] ๐š[๐‘ฆ] ๐š[๐‘ฆ] ๐š[๐‘ฆ] ๐š ๐‘ฆ โ‰… ๐‘† ๐‘ข = (๐‘” ๐‘ฆ , ๐‘ข) ีœ 1 ๐‘ฆ , ๐‘ข) ร— 2 ๐‘ฆ , ๐‘ข) ร— โ‹ฏ ร— (๐‘” (๐‘” ๐‘” ๐‘  ๐‘ฆ , ๐‘ข can be viewed as a vertical slicing of plaintext space: Each individual slice should cover the bounding box of the corresponding entry.

  29. Decomposing plaintext space We generalize this discussion: suppose ๐‘  ๐‘— ๐‘ข = ๐‘ข 1 ๐‘ข 2 ๐‘ข 3 โ‹ฏ ๐‘ข ๐‘ก ๐‘” ๐‘ฆ = เท‘ ๐‘” ๐‘—๐‘˜ (๐‘ฆ) mod ๐‘ข ๐‘— and ๐‘—=1 are factorizations into coprimes. Then: ๐š[๐‘ฆ] ๐š ๐‘ฆ ๐‘† ๐‘ข = (๐‘” ๐‘ฆ , ๐‘ข) โ‰… ร— ๐‘” ๐‘ฆ , ๐‘ข 1 โ‹ฎ ๐š ๐‘ฆ ร— ๐‘” ๐‘ฆ , ๐‘ข ๐‘ก

  30. Decomposing plaintext space We generalize this discussion: suppose ๐‘  ๐‘— ๐‘ข = ๐‘ข 1 ๐‘ข 2 ๐‘ข 3 โ‹ฏ ๐‘ข ๐‘ก ๐‘” ๐‘ฆ = เท‘ ๐‘” ๐‘—๐‘˜ (๐‘ฆ) mod ๐‘ข ๐‘— and ๐‘—=1 are factorizations into coprimes. Then: ๐š[๐‘ฆ] ๐š ๐‘ฆ ๐š ๐‘ฆ ๐š ๐‘ฆ ๐‘† ๐‘ข = (๐‘” ๐‘ฆ , ๐‘ข) โ‰… ร— ร— โ‹ฏ ร— ร— ๐‘” 11 ๐‘ฆ , ๐‘ข 1 ๐‘” 12 ๐‘ฆ , ๐‘ข 1 ๐‘” 1๐‘  1 ๐‘ฆ , ๐‘ข 1 โ‹ฎ ๐š ๐‘ฆ ๐š ๐‘ฆ ๐š ๐‘ฆ ร— ร— ร— โ‹ฏ ร— ๐‘” ๐‘ก1 ๐‘ฆ , ๐‘ข ๐‘ก ๐‘” ๐‘ก2 ๐‘ฆ , ๐‘ข ๐‘ก ๐‘” ๐‘ก๐‘  ๐‘ก ๐‘ฆ , ๐‘ข ๐‘ก

Recommend


More recommend