Browse Source

Move urls from gist to git and related README edits

index.html (test run output) is now called output.txt
Also added hash64 function (for paste integrity checks).
master
The Dod 10 years ago
parent
commit
1e601adaaf
  1. 13
      README.md
  2. 12
      darkened.py
  3. 55
      output.txt

13
README.md

@ -12,7 +12,8 @@
= ______________________________________________________________________________________________________________ = ______________________________________________________________________________________________________________
Unlike Alice, Bob doesn't get dropped packets when pinging legal department, and delays are no serious problem Unlike Alice, Bob doesn't get dropped packets when pinging legal department, and delays are no serious problem
#### Slightly longer examples [here](http://bl.ocks.org/thedod/raw/7a4a81224b5bed676b00/) and [here](https://pastee.org/v46af). #### Slightly longer examples [here](https://raw.githubusercontent.com/Knights-of-Redact/DarkenedAges/master/output.txt)
and [here](https://pastee.org/v46af).
For public moves and gossip, see [#DarkenedAges](https://twisterio.com/search?kw=%23darkenedages) on [twister](http://twister.net.co) For public moves and gossip, see [#DarkenedAges](https://twisterio.com/search?kw=%23darkenedages) on [twister](http://twister.net.co)
@ -59,10 +60,14 @@ Perhaps you could trade this information with their adversaries? The possibiliti
More info soon, meanwhile here's how to become a player: More info soon, meanwhile here's how to become a player:
* Every player should have a [twister](http://twister.net.co) account * Every player should have a [twister](http://twister.net.co) account
* <del>Fork this, add a line about yourself to `players.csv`, and mention `@darkenedages` on twister with a link to your forked gist.</del> Bugger it. Just twist `@darkenedages I want to play #DarkenedAges` ;) * <del>If you know how, add a line about yourself to [players.csv](https://github.com/Knights-of-Redact/DarkenedAges/blob/master/players.csv),
* It is recommended to follow `@darkenedages` and have `#DarkenedAges` in your profile, but the formal definition of "player" is "one who appears at [players.csv](https://gist.github.com/thedod/7a4a81224b5bed676b00#file-players-csv)" ;) (as a pull-request or something).</del> Bugger it. Just twist `@darkenedages I want to play #DarkenedAges` ;)
* It is recommended to follow `@darkenedages` and have `#DarkenedAges` in your profile, but the formal definition of "player" is
"one who appears at [players.csv](https://github.com/Knights-of-Redact/DarkenedAges/blob/master/players.csv)" ;)
The file [output.txt](https://raw.githubusercontent.com/Knights-of-Redact/DarkenedAges/master/output.txt)
was produced with `python darkened.py > output.txt`. You should get a similar output if everything works well.
Essentially [index.html](http://bl.ocks.org/thedod/raw/7a4a81224b5bed676b00/) was produced with `python darkened.py > index.html`.
The motivation behind this "full retard crypto suite" is to create an environment where everyone can have a go at code breaking. The motivation behind this "full retard crypto suite" is to create an environment where everyone can have a go at code breaking.
_______________________________________ _______________________________________

12
darkened.py

@ -2,6 +2,7 @@
import random import random
import time import time
import codecs import codecs
import hashlib
import json import json
import csv import csv
import textwrap import textwrap
@ -112,6 +113,10 @@ def unredact(cipher, pads, trustees=[]):
mapmsgs(base642bytes, mapmsgs(base642bytes,
mapmsgs(integrate, *pads64)))) mapmsgs(integrate, *pads64))))
def hash64(b):
"Returns base64 of sha1 (appended as hash to paste urls against evil eye)"
return str(codecs.encode(hashlib.sha1(b).digest(),'base64').strip(),'ascii')
## Game functions ## Game functions
def makeid(): def makeid():
@ -181,7 +186,7 @@ prefab = {
["sbuL", "qhM8EFAOWM0=", "oxO8cg==", None, "/eYQidGv/nc=", "epMLVQA=", ["sbuL", "qhM8EFAOWM0=", "oxO8cg==", None, "/eYQidGv/nc=", "epMLVQA=",
None, None, "i5dv", "Dh9fFA==", None, "gNKi", "lrEPMyg=", None], None, None, "i5dv", "Dh9fFA==", None, "gNKi", "lrEPMyg=", None],
[None, None, "+UoxOmBAFcvrFg==", "Xo4=", None, "4f56t0C6WA=="]]}, [None, None, "+UoxOmBAFcvrFg==", "Xo4=", None, "4f56t0C6WA=="]]},
"recipients": ["bob", "carol"], "subject": "Hey, sport. YOU connect" "recipients": ["bob", "carol"], "subject": "Hey, sport. YOU connect "
"the dots."}, "ted": {"trustees": ["ted", "dan"], "sender": "alice", "the dots."}, "ted": {"trustees": ["ted", "dan"], "sender": "alice",
"msgid": "DA14341968415407", "pads": {"ted": [["xWusIv5F", "29q4dg==", "msgid": "DA14341968415407", "pads": {"ted": [["xWusIv5F", "29q4dg==",
"zAa7Rc4K", "pqY7HvIXqHA1RRWMhA==", None, None, "lSXD+g==", None, "zAa7Rc4K", "pqY7HvIXqHA1RRWMhA==", None, None, "lSXD+g==", None,
@ -197,7 +202,6 @@ prefab = {
def testit(): def testit():
"Todo: turn this into proper unit tests, anyone?" "Todo: turn this into proper unit tests, anyone?"
print('<!DOCTYPE html>\n<html lang="en"><head><title>Testing DarkenedAges library</title><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body><pre>')
print('### Players') print('### Players')
for p in getplayers().values(): for p in getplayers().values():
print('\n# {name} ({player}, @{twister}):'.format(**p)) print('\n# {name} ({player}, @{twister}):'.format(**p))
@ -214,11 +218,9 @@ def testit():
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']:
print('\n# >>> Unredaction for trustee: {}'.format(t)) print('\n# >>> Unredaction for trustee: {}'.format(t))
print(unredact(prefab['__public__'], prefab[t])) print(unredact(prefab['__public__'], prefab['__to__'],trustees=[t]))
print('\n### >>> integration >>>') print('\n### >>> integration >>>')
print(unredact(prefab['__public__'], prefab['__to__'])) print(unredact(prefab['__public__'], prefab['__to__']))
print('</pre></body></html>')
if __name__=='__main__': if __name__=='__main__':
testit() testit()

55
index.html → output.txt

@ -1,9 +1,7 @@
<!DOCTYPE html>
<html lang="en"><head><title>Testing DarkenedAges library</title><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body><pre>
### Players ### Players
# Sandy Claws (sandyclaws, @sandyclaws): # Forth Inc. (forth, @forth):
From the Magic Tuna Show (ask your kids). Registered ████████.
# Rabbi Yoav (broyo, @thedod): # Rabbi Yoav (broyo, @thedod):
Confession sensor technician (CST) and ChurchApproved Rabbi (CAR) Confession sensor technician (CST) and ChurchApproved Rabbi (CAR)
@ -13,40 +11,40 @@
(mainly due to family and origin). 77% heterosexual. No other known (mainly due to family and origin). 77% heterosexual. No other known
dominant deviatoins. dominant deviatoins.
# Forth Inc. (forth, @forth): # Sandy Claws (sandyclaws, @sandyclaws):
Registered ████████. From the Magic Tuna Show (ask your kids).
# Daan II (daanii, @black_puppydog): # Daan II (daanii, @black_puppydog):
██ ███ ███████ of ██████. ██ ███ ███████ of ██████.
### Redacting prefab plaintext (2 trustees) ### Redacting prefab plaintext (2 trustees)
{"daanii": {"pads": {"daanii": [["krEZr3A9", null, "Ew+m5z8=", {"__to__": {"msgid": "DA14342296128997", "sender": "alice",
"zMwQeJk="], [null, "oDo=", "Gg==", null, "LSr3"]]}, "subject": "Is "recipients": ["bob", "carol"], "subject": "Is this thing on?",
this thing on?", "sender": "alice", "trustees": ["daanii", "broyo"], "pads": {"broyo": [["DeQiOr6R", null, null, "ql8ABmM="],
"msgid": "DA14341999781041", "recipients": ["bob", "carol"]}, ["wKFeiKus9u8=", "VLY=", "Kg==", null, null]], "daanii": [[null,
"__public__": {"cipher": [["2tRryldO", "5F+i", "dWbUlEs=", "oM8O", "wBgmWVc=", null], [null, null, null, "z8G1nS+/", "zLhb"]]},
"oKV+HbU="], ["to5RIGi8VsQ=", "wkM=", "ew==", "mIQCOq/5", "QkSS"]], "trustees": ["daanii", "broyo"]}, "broyo": {"msgid":
"subject": "Is this thing on?", "sender": "alice", "trustees": "DA14342296128997", "sender": "alice", "recipients": ["bob", "carol"],
["daanii", "broyo"], "msgid": "DA14341999781041", "recipients": "subject": "Is this thing on?", "pads": {"broyo": [["DeQiOr6R", null,
["bob", "carol"]}, "__to__": {"pads": {"daanii": [["krEZr3A9", null, null, "ql8ABmM="], ["wKFeiKus9u8=", "VLY=", "Kg==", null, null]]},
"Ew+m5z8=", "zMwQeJk="], [null, "oDo=", "Gg==", null, "LSr3"]], "trustees": ["daanii", "broyo"]}, "__public__": {"msgid":
"broyo": [[null, "kDfH", null, null], ["0OE9TAfLM6A=", null, null, "DA14342296128997", "sender": "alice", "recipients": ["bob", "carol"],
"6+FhVcGd", null]]}, "subject": "Is this thing on?", "sender": "cipher": [["RYFQX5ni", "1Kdr", "pnFUKiM=", "xjZuY08="],
"alice", "trustees": ["daanii", "broyo"], "msgid": "DA14341999781041", ["ps4y5MTbk4s=", "Ns8=", "Sw==", "vKTW8kHb", "o9Y+"]], "subject": "Is
"recipients": ["bob", "carol"]}, "broyo": {"pads": {"broyo": [[null, this thing on?", "trustees": ["daanii", "broyo"]}, "daanii": {"msgid":
"kDfH", null, null], ["0OE9TAfLM6A=", null, null, "6+FhVcGd", null]]}, "DA14342296128997", "sender": "alice", "recipients": ["bob", "carol"],
"subject": "Is this thing on?", "sender": "alice", "trustees": "subject": "Is this thing on?", "pads": {"daanii": [[null, "oM8O",
["daanii", "broyo"], "msgid": "DA14341999781041", "recipients": "wBgmWVc=", null], [null, null, null, "z8G1nS+/", "zLhb"]]},
["bob", "carol"]}} "trustees": ["daanii", "broyo"]}}
# >>> Unredaction for trustee: daanii # >>> Unredaction for trustee: daanii
Here's ███ first line, ██████ the first █████
████████ by a ██████ one ████████ ██ second one
# >>> Unredaction for trustee: broyo # >>> Unredaction for trustee: broyo
██████ the █████ █████ Here's ███ █████ line,
followed ██ █ second ███ followed by a ██████ ███
### >>> integration >>> ### >>> integration >>>
Here's the first line, Here's the first line,
@ -75,4 +73,3 @@ access to the Pujinda paper. As far as we know, it may have never leaked.
The El-Hamdan encryption crack is a result of independent research by FTT. The El-Hamdan encryption crack is a result of independent research by FTT.
DHQ predicts that the official story (that FTT has died in the ╳╳╳╳╳ crash) DHQ predicts that the official story (that FTT has died in the ╳╳╳╳╳ crash)
won't be challenged by the public. won't be challenged by the public.
</pre></body></html>
Loading…
Cancel
Save