I am working on system which can calculate average salary for different positions in large companies I want to use Paillier schema to do such calculation.
I have 3 fields which I want to encrypt: companyName, jobTitle, seniority and salary
Let’s say I have 3 different companies which want to calculate average salary on different positions but they don’t want to share data between them. We have such dataset
NAME | JOB TITLE | Seniority | Salary |
---|---|---|---|
COMPANYA | MANAGER | 2 | 10000 |
COMPANYA | MANAGER | 3 | 15000 |
COMPANYA | developer | 1 | 18000 |
COMPANYA | developer | 5 | 11000 |
NAME | JOB TITLE | Seniority | Salary |
---|---|---|---|
COMPANYB | MANAGER | 2 | 11000 |
COMPANYB | MANAGER | 3 | 14000 |
COMPANYB | developer | 1 | 8000 |
COMPANYB | developer | 5 | 14000 |
NAME | JOB TITLE | Seniority | Salary |
---|---|---|---|
COMPANYC | MANAGER | 2 | 12000 |
COMPANYC | MANAGER | 3 | 15000 |
COMPANYC | developer | 1 | 8000 |
COMPANYC | developer | 5 | 15000 |
Company A, B and C before sending data to my system encrypts them using Paillier (they all are using same key), than they are sending it to my system. My system knows only public key so it can calculate average salary for specific job title, than my system can send encrypted result to all companies and than they can decrypt it using private key and check what is average salary on specific positions taking into account salaries in other companies.
To avoid frequency attack I want to encrypt text data (company name and job title) using Paillier as well. I can assume that company name and job title is no longer than 20 bytes. Now my question: Do you think that system is safe? My system stores all information in encrypted form but don’t know private key so it can’t decrypt it. Let’s say in my system was data leak and somebody have all information in encrypted form (private key is not compromised) do you think he can perform any attack to decrypt data? Job titles are mostly dictionary data. Salary and seniority it’s a narrow range of numbers. What do you think? Thanks in advance for any input!