Skip to content

Feature 1.10 ecdh mpsi - #4379

Merged
mgqa34 merged 6 commits into
develop-1.10.0from
feature-1.10-ecdh-mpsi
Nov 15, 2022
Merged

mgqa34 merged 6 commits into
develop-1.10.0from
feature-1.10-ecdh-mpsi

Conversation

@nemirorox

Copy link
Copy Markdown
Contributor

Signed-off-by: githubID email

Fixes ISSUE #4325 #4338

Changes:

Signed-off-by: nemirorox <yolandawu131@gmail.com>
Signed-off-by: nemirorox <yolandawu131@gmail.com>
Signed-off-by: nemirorox <yolandawu131@gmail.com>
Comment on lines +148 to +161
host_party = self.host_party_id_list[0]
intersect_key = cache_meta[str(host_party)]["intersect_key"]
mod_base = int(intersect_key["mod_base"])
exponent = int(intersect_key["exponent"])
for host_party in self.host_party_id_list:
cur_intersect_key = cache_meta[str(host_party)]["intersect_key"]

mod_base = int(intersect_key["mod_base"])
exponent = int(intersect_key["exponent"])
cur_mod_base = int(cur_intersect_key["mod_base"])
cur_exponent = int(cur_intersect_key["exponent"])
if cur_mod_base != mod_base or cur_exponent != exponent:
raise ValueError("Not all intersect keys from cache match, please check.")

ph_key = PohligHellmanCipherKey(mod_base, exponent)
commutative_cipher.append(CryptoExecutor(ph_key))

self.commutative_cipher = commutative_cipher
ph_key = PohligHellmanCipherKey(mod_base, exponent)
self.commutative_cipher = CryptoExecutor(ph_key)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[autopep8] reported by reviewdog 🐶

Suggested change
host_party = self.host_party_id_list[0]
intersect_key = cache_meta[str(host_party)]["intersect_key"]
mod_base = int(intersect_key["mod_base"])
exponent = int(intersect_key["exponent"])
for host_party in self.host_party_id_list:
cur_intersect_key = cache_meta[str(host_party)]["intersect_key"]
mod_base = int(intersect_key["mod_base"])
exponent = int(intersect_key["exponent"])
cur_mod_base = int(cur_intersect_key["mod_base"])
cur_exponent = int(cur_intersect_key["exponent"])
if cur_mod_base != mod_base or cur_exponent != exponent:
raise ValueError("Not all intersect keys from cache match, please check.")
ph_key = PohligHellmanCipherKey(mod_base, exponent)
commutative_cipher.append(CryptoExecutor(ph_key))
self.commutative_cipher = commutative_cipher
ph_key = PohligHellmanCipherKey(mod_base, exponent)
self.commutative_cipher = CryptoExecutor(ph_key)
host_party = self.host_party_id_list[0]
intersect_key = cache_meta[str(host_party)]["intersect_key"]
mod_base = int(intersect_key["mod_base"])
exponent = int(intersect_key["exponent"])
for host_party in self.host_party_id_list:
cur_intersect_key = cache_meta[str(host_party)]["intersect_key"]
cur_mod_base = int(cur_intersect_key["mod_base"])
cur_exponent = int(cur_intersect_key["exponent"])
if cur_mod_base != mod_base or cur_exponent != exponent:
raise ValueError("Not all intersect keys from cache match, please check.")
ph_key = PohligHellmanCipherKey(mod_base, exponent)
self.commutative_cipher = CryptoExecutor(ph_key)

Signed-off-by: nemirorox <yolandawu131@gmail.com>
…b.com:FederatedAI/FATE into feature-1.10-ecdh-mpsi

� Conflicts:
�	python/federatedml/statistic/intersect/intersect_model.py
Signed-off-by: nemirorox <yolandawu131@gmail.com>
@mgqa34
mgqa34 merged commit d0c5aa8 into develop-1.10.0 Nov 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants