mirror of https://github.com/nucypher/nucypher.git
Impossible condition passes with ThisBobAlwaysDecrypts.
parent
8ae0cb08e7
commit
f31391164c
|
@ -1,5 +1,5 @@
|
|||
from examples.tdec.demo_utilities.demo_sample_conditions import ten_oclock_florida_time
|
||||
from nucypher.characters.chaotic import NiceGuyEddie, ThisBobAlwaysDecrypts
|
||||
from nucypher.policy.conditions.lingo import ConditionLingo
|
||||
|
||||
plaintext = b"PEACE AD DAWN"
|
||||
THIS_IS_NOT_A_TRINKET = 55
|
||||
|
@ -9,16 +9,25 @@ bob = ThisBobAlwaysDecrypts(domain="lynx", eth_provider_uri="Nowhere")
|
|||
|
||||
ANYTHING_CAN_BE_PASSED_AS_RITUAL_DATA = 55
|
||||
|
||||
before_the_beginning_of_time = {
|
||||
"version": ConditionLingo.VERSION,
|
||||
"condition": {
|
||||
"chain": 1,
|
||||
"method": "blocktime",
|
||||
"returnValueTest": {"comparator": "<", "value": 0},
|
||||
},
|
||||
}
|
||||
|
||||
ciphertext, tdr = enrico.encrypt_for_dkg_and_produce_decryption_request(
|
||||
plaintext=plaintext,
|
||||
conditions=ten_oclock_florida_time,
|
||||
conditions=before_the_beginning_of_time,
|
||||
ritual_id=ANYTHING_CAN_BE_PASSED_AS_RITUAL_DATA,
|
||||
)
|
||||
|
||||
decrypted_cleartext_from_ciphertext_list = bob.threshold_decrypt(
|
||||
ciphertext=ciphertext,
|
||||
ritual_id=ANYTHING_CAN_BE_PASSED_AS_RITUAL_DATA,
|
||||
conditions=ten_oclock_florida_time,
|
||||
conditions=before_the_beginning_of_time,
|
||||
)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue