mirror of
https://github.com/twisterarmy/DarkenedAges.git
synced 2025-03-12 05:21:20 +00:00
Merge branch 'master' of github.com:Knights-of-Redact/DarkenedAges
This commit is contained in:
commit
d7b9f5cd6d
@ -56,6 +56,8 @@ Perhaps you could trade this information with their adversaries? The possibiliti
|
|||||||
|
|
||||||
### How to play
|
### How to play
|
||||||
|
|
||||||
|
**Note:** All code here should be run with python3. No telling what this code might do on python2 ;)
|
||||||
|
|
||||||
#### First you need to join
|
#### First you need to join
|
||||||
|
|
||||||
* Every player should have a [twister](http://twister.net.co) account
|
* Every player should have a [twister](http://twister.net.co) account
|
||||||
|
@ -206,14 +206,14 @@ def testit():
|
|||||||
for p in getplayers().values():
|
for p in getplayers().values():
|
||||||
print('\n# {name} ({player}, @{twister}):'.format(**p))
|
print('\n# {name} ({player}, @{twister}):'.format(**p))
|
||||||
print('\n'.join(' '+l for l in textwrap.wrap(p['bio'])))
|
print('\n'.join(' '+l for l in textwrap.wrap(p['bio'])))
|
||||||
print('\n\n### Redacting prefab plaintext (2 trustees)')
|
print('\n\n### Redacting "fake redaction" to 2 trustees')
|
||||||
plaintext = "Here's the first line, \nfollowed by a second one"
|
plaintext = "You're not as █████████\nas you think you are"
|
||||||
redaction = redact(plaintext, 'alice', recipients=['bob','carol'], subject='Is this thing on?', k=2)
|
redaction = redact(plaintext, 'alice', recipients=['bob','carol'], subject='Is this thing on?', k=2)
|
||||||
for line in textwrap.wrap(json.dumps(redaction)): print(line)
|
for line in textwrap.wrap(json.dumps(redaction)): print(line)
|
||||||
for t in redaction['__public__']['trustees']:
|
for t in redaction['__public__']['trustees']:
|
||||||
print('\n# >>> Unredaction for trustee: {}'.format(t))
|
print('\n# >>> Unredaction for trustee: {}'.format(t))
|
||||||
print(unredact(redaction['__public__'], redaction[t]))
|
print(unredact(redaction['__public__'], redaction[t]))
|
||||||
print('\n### >>> integration >>>')
|
print('\n(one of them has utf-8 bloat)\n\n### >>> integration >>>')
|
||||||
print(unredact(redaction['__public__'], redaction['__to__']))
|
print(unredact(redaction['__public__'], redaction['__to__']))
|
||||||
print('\n\n### Unredaction of prefab message (with conflicting pads)')
|
print('\n\n### Unredaction of prefab message (with conflicting pads)')
|
||||||
for t in prefab['__public__']['trustees']:
|
for t in prefab['__public__']['trustees']:
|
||||||
|
80
output.txt
80
output.txt
@ -1,5 +1,16 @@
|
|||||||
### Players
|
### Players
|
||||||
|
|
||||||
|
# Zabadee O'Mally (zayo, @zayo):
|
||||||
|
A defrocked ███████████ priest turned confession analysis contractor
|
||||||
|
(CAC).
|
||||||
|
|
||||||
|
# Daan II (daanii, @black_puppydog):
|
||||||
|
██ ███ ███████ of ██████.
|
||||||
|
|
||||||
|
# Trantor Alexis (talex, @talex):
|
||||||
|
A confirmed human resident of █████████ ███████████ and ChurchApproved
|
||||||
|
DepescheProzessor since 2048.
|
||||||
|
|
||||||
# Rabbi Yoav (broyo, @thedod):
|
# Rabbi Yoav (broyo, @thedod):
|
||||||
Confession sensor technician (CST) and ChurchApproved Rabbi (CAR)
|
Confession sensor technician (CST) and ChurchApproved Rabbi (CAR)
|
||||||
[technically, a priest] in the Geneva parish. Born 2061 in Kibbutz
|
[technically, a priest] in the Geneva parish. Born 2061 in Kibbutz
|
||||||
@ -8,54 +19,47 @@
|
|||||||
(mainly due to family and origin). 77% heterosexual. No other known
|
(mainly due to family and origin). 77% heterosexual. No other known
|
||||||
dominant deviations.
|
dominant deviations.
|
||||||
|
|
||||||
# Daan II (daanii, @black_puppydog):
|
# Forth Inc. (forth, @forth):
|
||||||
██ ███ ███████ of ██████.
|
Registered ████████.
|
||||||
|
|
||||||
# Trantor Alexis (talex, @talex):
|
|
||||||
A confirmed human resident of █████████ ███████████ and ChurchApproved
|
|
||||||
DepescheProzessor since 2048.
|
|
||||||
|
|
||||||
# Zabadee O'Mally (zayo, @zayo):
|
|
||||||
A defrocked ███████████ priest turned confession analysis contractor
|
|
||||||
(CAC).
|
|
||||||
|
|
||||||
# Sandy Claws (sandyclaws, @sandyclaws):
|
# Sandy Claws (sandyclaws, @sandyclaws):
|
||||||
From the Magic Tuna Show (ask your kids).
|
From the Magic Tuna Show (ask your kids).
|
||||||
|
|
||||||
# Forth Inc. (forth, @forth):
|
|
||||||
Registered ████████.
|
|
||||||
|
|
||||||
|
### Redacting "fake redaction" to 2 trustees
|
||||||
|
{"__public__": {"recipients": ["bob", "carol"], "cipher":
|
||||||
|
[["W7MZY1y1", "mnb7", "TQY=", "sT6ZUgYlTlkIaog69AbAFgYCydQ/Na335paz"],
|
||||||
|
["mCs=", "KalY", "7uvPaTg=", "D4Nc", "jaiB"]], "sender": "alice",
|
||||||
|
"subject": "Is this thing on?", "trustees": ["forth", "zayo"],
|
||||||
|
"msgid": "DA14348757490111"}, "forth": {"recipients": ["bob",
|
||||||
|
"carol"], "pads": {"forth": [[null, "9BmP", null,
|
||||||
|
"U6gRsJCtrM+AiB6yFpBI9JCKK0K31zt/BAA7"], ["+Vg=", "UMYt", "moOmB1M=",
|
||||||
|
"duwp", null]]}, "sender": "alice", "subject": "Is this thing on?",
|
||||||
|
"trustees": ["forth", "zayo"], "msgid": "DA14348757490111"}, "zayo":
|
||||||
|
{"recipients": ["bob", "carol"], "pads": {"zayo": [["AtxsRC7Q", null,
|
||||||
|
"LHU=", null], [null, null, null, null, "7Nrk"]]}, "sender": "alice",
|
||||||
|
"subject": "Is this thing on?", "trustees": ["forth", "zayo"],
|
||||||
|
"msgid": "DA14348757490111"}, "__to__": {"recipients": ["bob",
|
||||||
|
"carol"], "pads": {"forth": [[null, "9BmP", null,
|
||||||
|
"U6gRsJCtrM+AiB6yFpBI9JCKK0K31zt/BAA7"], ["+Vg=", "UMYt", "moOmB1M=",
|
||||||
|
"duwp", null]], "zayo": [["AtxsRC7Q", null, "LHU=", null], [null,
|
||||||
|
null, null, null, "7Nrk"]]}, "sender": "alice", "subject": "Is this
|
||||||
|
thing on?", "trustees": ["forth", "zayo"], "msgid":
|
||||||
|
"DA14348757490111"}}
|
||||||
|
|
||||||
### Redacting prefab plaintext (2 trustees)
|
# >>> Unredaction for trustee: forth
|
||||||
{"__to__": {"sender": "alice", "recipients": ["bob", "carol"],
|
██████ not ██ █████████
|
||||||
"subject": "Is this thing on?", "msgid": "DA14345355125001", "pads":
|
as you think you ███
|
||||||
{"daanii": [["EX9FwomA", null, "O1oE0lk=", "8bBvQdY="], [null, "Ddw=",
|
|
||||||
null, "PjVkQR2S", "rPqr"]], "talex": [[null, "4t54", null, null],
|
|
||||||
["5E2TnuiWtQQ=", null, "Hw==", null, null]]}, "trustees": ["daanii",
|
|
||||||
"talex"]}, "daanii": {"sender": "alice", "recipients": ["bob",
|
|
||||||
"carol"], "subject": "Is this thing on?", "msgid": "DA14345355125001",
|
|
||||||
"pads": {"daanii": [["EX9FwomA", null, "O1oE0lk=", "8bBvQdY="], [null,
|
|
||||||
"Ddw=", null, "PjVkQR2S", "rPqr"]]}, "trustees": ["daanii", "talex"]},
|
|
||||||
"__public__": {"cipher": [["WRo3p67z", "lrYd", "XTN2oS0=",
|
|
||||||
"ndkBJPo="], ["giL/8ofh0GA=", "b6U=", "fg==", "TVAHLnP2", "w5TO"]],
|
|
||||||
"sender": "alice", "recipients": ["bob", "carol"], "subject": "Is this
|
|
||||||
thing on?", "msgid": "DA14345355125001", "trustees": ["daanii",
|
|
||||||
"talex"]}, "talex": {"sender": "alice", "recipients": ["bob",
|
|
||||||
"carol"], "subject": "Is this thing on?", "msgid": "DA14345355125001",
|
|
||||||
"pads": {"talex": [[null, "4t54", null, null], ["5E2TnuiWtQQ=", null,
|
|
||||||
"Hw==", null, null]]}, "trustees": ["daanii", "talex"]}}
|
|
||||||
|
|
||||||
# >>> Unredaction for trustee: daanii
|
# >>> Unredaction for trustee: zayo
|
||||||
Here's ███ first line,
|
You're ███ as ███████████████████████████
|
||||||
████████ by █ second one
|
██ ███ █████ ███ are
|
||||||
|
|
||||||
# >>> Unredaction for trustee: talex
|
(one of them has utf-8 bloat)
|
||||||
██████ the █████ █████
|
|
||||||
followed ██ a ██████ ███
|
|
||||||
|
|
||||||
### >>> integration >>>
|
### >>> integration >>>
|
||||||
Here's the first line,
|
You're not as █████████
|
||||||
followed by a second one
|
as you think you are
|
||||||
|
|
||||||
|
|
||||||
### Unredaction of prefab message (with conflicting pads)
|
### Unredaction of prefab message (with conflicting pads)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user