[HN Gopher] A JPEG Image Compression Service Using Part Homomorp...
       ___________________________________________________________________
        
       A JPEG Image Compression Service Using Part Homomorphic Encryption
        
       Author : keepamovin
       Score  : 25 points
       Date   : 2025-03-03 09:35 UTC (3 days ago)
        
 (HTM) web link (github.com)
 (TXT) w3m dump (github.com)
        
       | pogue wrote:
       | What would you use this for?
        
         | 77pt77 wrote:
         | Compressing images into jpeg without anyone else ever seeing
         | them.
         | 
         | I personally would prefer something like Homomorphic encryption
         | for say sql queries on a database that the server can never
         | read.
        
           | tgv wrote:
           | There's no information in the repo, but I suppose this means
           | jpeg compression of an encrypted image without decryption,
           | right?
        
             | mystified5016 wrote:
             | Yes. Homomorphic encryption means that you can do math to
             | the encrypted file to produce a _new_ encrypted file. The
             | operator doing the math cannot read either version, but the
             | owner of the original file can.
        
           | pogue wrote:
           | Without anyone ever seeing them?
        
         | perching_aix wrote:
         | As a technological demonstration of homomorphic encryption and
         | its benefit.
        
           | cogman10 wrote:
           | I'm having a hard time wrapping my head around how you'd do
           | homomorphic encryption securely (particularly FHE).
           | 
           | Like, for example, let's say I want to farm out word counts
           | to the cloud. Wouldn't the information required to identify
           | what a "word" is require the running software to be able to
           | see breaks/periods/etc? Doesn't that leak information about
           | the cyphertext? How does it stop someone from writing
           | software that, for example, maps out the position of all the
           | a's, then b's, then c's, etc in a cyphertext and MITMing it?
        
             | perching_aix wrote:
             | I think the idea is that you would never get to know the
             | answer to those individual questions, or any questions
             | really; you'd be producing an encrypted blob of a response
             | that supposedly has the answer and then just pass that
             | onward.
             | 
             | Unfortunately the mathematical details escape me as well.
             | Maybe one day I'll set aside some time to look into it.
        
             | fragmede wrote:
             | That wouldn't be FHE, for the reason you identified.
             | Outside of a tiny number of algorithms, homomorphic
             | encryption doesn't usefully generalize to something as
             | generic as word counting of arbitrary text like that.
             | Production use of FHE is really limited. Probably the most
             | well known application is by Apple for phone number lookup,
             | where they're able to get the caller id for a phone number
             | without knowing the phone number, basically.
        
             | uniq7 wrote:
             | I don't know what's the current state of the art, I only
             | read Craig Gentry, 2009 [1] (the first FHE scheme
             | proposed), but the main idea there is that an untrusted
             | agent can perform operations on the encrypted data (i.e.,
             | addition and multiplication) and obtain an encrypted result
             | that cannot be read but can be sent to the user.
             | 
             | Since the scheme is asymmetric, the untrusted agent can
             | also encrypt new data with the public key, meaning that
             | they can do things like: `return encrypt(x) +
             | encrypted_data_from_user * encrypt(y)`
             | 
             | I guess this alone doesn't let the untrusted agent evaluate
             | a boolean condition or run an algorithm like the one you
             | proposed, but they can at least run encrypted data through
             | a neural network and send the encrypted output to the user.
             | 
             | [1] https://www.cs.cmu.edu/~odonnell/hits09/gentry-
             | homomorphic-e...
        
       | alberth wrote:
       | "Compression" and "Encryption" seem like two words I wouldn't
       | expect in the same sentence.
       | 
       | Wouldn't you compress the file independently ... regardless of
       | anytype of encryption (homomorphic or not).
        
         | Almondsetat wrote:
         | This is image compression, which uses visual tricks, not simple
         | binary file compression
        
           | alberth wrote:
           | Isn't a JPEG already compressed.
           | 
           | I'm confused.
        
             | Almondsetat wrote:
             | The service is taking an encrypted image and compressing it
             | without decrypting it
        
       ___________________________________________________________________
       (page generated 2025-03-06 23:00 UTC)