mirror of https://github.com/nucypher/nucypher.git
Update finnegan's wake demo to work properly, and update README.
parent
036c9bda22
commit
52341f2e3d
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
||||
###############
|
||||
|
|
Loading…
Reference in New Issue