Closed DestructiveReasoning closed 6 years ago
Starting progress in branch refactorCrypto-22.
Implemented symkey messages with OnionNode.create_symkey_msg()
. Created Originator.create_onion()
to make encrypted data messages. Similarly, created their respective decrypting methods and wrote unit tests to ensure that everything is working properly.
Refactored misnamed classes.
Originator
is now known as OriginatorSecurityEnforcer
,
OnionNode
is now known as OnionNodeSecurityEnforcer
.
Based on the conclusions from #16, much of the current crypto implementation is obsolete.
Here's a quick list of changes that need to be made:
create_onion_packet()
currently creates encrypted, layered JSON messages. Right now its behavior is different for establishment messages and onion messages, however data messages actually don't need layered JSON anymore (#16). Therefore, only the establishment part needs to stay, and perhaps be modified for compatibility.peel_layer
function now should just simply decrypt packets it receives with its symmetric keystealth/
directory, such asOriginator
andOnionNode
, have misleading names. Once I'm refactoring this stuff I might as well rename them.stealth/test.py
are almost certainly going to be obsolete after these changes are made, aside from possibly thetest_basic_rsa()
test case. The other test cases should be refactored as well to preserve sanity and for good practice.Following the resolution of this issue, we will be more or less ready to incorporate cryptography in
onion_router.py
andonion_client.py
.