Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[POC] Secure channel abstraction #11

Open
wants to merge 31 commits into
base: trusted-aggr-stash
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
8e63a53
introduce secure channel class
yanndupis May 7, 2020
779696f
add cooments
yanndupis May 7, 2020
758b5f1
mv _zip_val_key to secure channel
yanndupis May 7, 2020
f256b35
rm config_channels from SecureChannels
yanndupis May 7, 2020
0aebe44
mv channel receive to -move
yanndupis May 8, 2020
b2c8218
mv send and reeceeive to -move
yanndupis May 8, 2020
9564eda
fix names
yanndupis May 8, 2020
1358972
generate clients keys during setup phase
yanndupis May 11, 2020
98631a3
working with keys generated during setup
yanndupis May 12, 2020
aa6c128
separate keys placement from generate keys
yanndupis May 12, 2020
4f00d28
clean up
yanndupis May 12, 2020
9c99865
clean up
yanndupis May 12, 2020
095519a
introduce channel base class
yanndupis May 13, 2020
f779c6b
encrypt method expects a list of eager val
yanndupis May 13, 2020
a16a4a8
clean up
yanndupis May 13, 2020
9c16c9f
rename file to channel_base
yanndupis May 13, 2020
78a59e0
remove key generation and exchange on base class
yanndupis May 13, 2020
4236f3c
method name cleanup
yanndupis May 13, 2020
813fbd7
check if the channel has already been setup
yanndupis May 14, 2020
a913bde
rename sender_index & receiver_index
yanndupis May 14, 2020
a8c4504
store channels in ChannelGrid
yanndupis May 14, 2020
30202bd
fix indentation
yanndupis May 14, 2020
38fdef8
move _place_keys for sk to _generate_keys
yanndupis May 14, 2020
c6e98be
fix bug
yanndupis May 14, 2020
930fad9
_decrypt_values_on_receiver return list of EagerValues
yanndupis May 14, 2020
1355408
clean up
yanndupis May 14, 2020
d8a4106
clean up
yanndupis May 14, 2020
bce9596
input/output constantly internal_representation of fed val
yanndupis May 14, 2020
e6e62e2
cache encrypt and decrypt computation
yanndupis May 14, 2020
ec2dd90
add key setup test
yanndupis May 14, 2020
07404a9
add encryption decryption test
yanndupis May 14, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions tensorflow_federated/python/core/impl/executors/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,7 @@ py_library(
srcs = ["federating_executor.py"],
srcs_version = "PY3",
deps = [
":base_channel",
":executor_base",
":executor_utils",
":executor_value_base",
Expand All @@ -439,6 +440,12 @@ py_library(
],
)

py_library(
name = "base_channel",
srcs = ["base_channel.py"],
srcs_version = "PY3",
)

py_test(
name = "federating_executor_test",
size = "small",
Expand Down
24 changes: 24 additions & 0 deletions tensorflow_federated/python/core/impl/executors/base_channel.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import abc


class Channel(metaclass=abc.ABCMeta):

@abc.abstractmethod
async def send(self, value, sender_index=None, receiver_index=None):
pass

@abc.abstractmethod
async def receive(self, value, sender_index=None, receiver_index=None):
Copy link
Member

Choose a reason for hiding this comment

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

what is value here? how does it relate to the return value of receive?

Copy link
Member Author

Choose a reason for hiding this comment

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

value is list of EagerValues and it was returning a FederatingExecutorValue. I changed it to return a list of EagerValues.

I have the same pb with _encrypt_values_on_sender. However not sure yet, how to keep this Federatedtype check (if needed) if I return a list of EagerValues after encryption.

pass

@abc.abstractmethod
async def setup(self):
pass

@abc.abstractmethod
async def _generate_keys(self, key_owner):
pass

@abc.abstractmethod
async def _share_public_keys(self, key_owner, send_pks_to):
pass
Loading