Update finnegan's wake demo to work properly, and update README.

pull/3258/head
derekpierre 2023-09-28 11:44:56 -04:00
parent 036c9bda22
commit 52341f2e3d
2 changed files with 13 additions and 10 deletions

View File

@ -1,7 +1,7 @@
# Finnegan's Wake Demo
# PRE Finnegan's Wake Demo
This illustrates Alice sharing data with Bob over the Threshold Network using proxy re-encryption (PRE),
without revealing private keys to intermediary entities. For more detailed information see the [official documentation](https://docs.nucypher.com/en/latest/).
This illustrates Alice sharing data with Bob over the Threshold Network using TACo's proxy re-encryption (PRE),
without revealing private keys to intermediary entities.
First, configure the demo by making exporting environment variables
with your provider and wallet details.

View File

@ -41,12 +41,12 @@ except KeyError:
print("\n************** Setup **************\n")
####################
# NuCypher Network #
####################
###########
# Network #
###########
L1_NETWORK = 'mainnet' # or 'tapir'
L2_NETWORK = 'polygon' # or 'mumbai'
L1_NETWORK = "lynx"
L2_NETWORK = "mumbai"
#####################
# Bob the BUIDLer ##
@ -54,7 +54,10 @@ L2_NETWORK = 'polygon' # or 'mumbai'
# Then, there was bob. Bob learns about the
# rest of the network from the seednode.
bob = Bob(domain=L1_NETWORK)
bob = Bob(
domain=L1_NETWORK,
eth_provider_uri=L1_PROVIDER,
)
# Bob puts his public keys somewhere alice can find them.
verifying_key = bob.public_keys(SigningPower)
@ -108,6 +111,7 @@ policy_public_key = alice.get_policy_encrypting_key_from_label(label)
remote_bob = Bob.from_public_keys(
encrypting_key=encrypting_key,
verifying_key=verifying_key,
eth_provider_uri=L1_PROVIDER,
)
# These are the policy details.
@ -155,7 +159,6 @@ for counter, plaintext in enumerate(finnegans_wake):
# The matter of whether encryption makes the passage more or less readable
# is left to the reader to determine.
message_kit = enrico.encrypt_for_pre(plaintext)
enrico_public_key = bytes(enrico.stamp)
del enrico
###############