Compare commits
2 Commits
8bec4c07cc
...
a865eee0e6
Author | SHA1 | Date |
---|---|---|
Agie Ashwood | a865eee0e6 | |
Agie Ashwood | 6f5bfe43db |
|
@ -6,13 +6,13 @@ This is the monorepo for PierMesh.
|
|||
|
||||
# Docs
|
||||
|
||||
You can find the full docs here: [docs/](docs/)
|
||||
You can find the full docs here: [docs/](https://git.utopic.work/PierMesh/piermesh/src/branch/main/docs)
|
||||
|
||||
# How to use
|
||||
|
||||
Note: these instructions will probably only work on Linux at the moment
|
||||
|
||||
Note: check the scripts to make sure they'll work with your system, and in general I reccomend checking scripts before you run them
|
||||
Note: check the scripts to make sure they'll work with your system, and in general I recommend checking scripts before you run them
|
||||
|
||||
Follow Meshtastic's guide on setting up your device: [https://meshtastic.org/docs/getting-started/](https://meshtastic.org/docs/getting-started/)
|
||||
Make sure you have the latest Python installed
|
||||
|
|
|
@ -257,6 +257,7 @@ class DHEFern:
|
|||
"""
|
||||
return os.urandom(16)
|
||||
|
||||
# TODO: Build in transport security (node/node)
|
||||
def encrypt(self, data, nodeID: str, isDict: bool = True):
|
||||
"""
|
||||
Do Fernet encryption
|
||||
|
|
|
@ -27,6 +27,7 @@ class Message:
|
|||
senderDisplayName: int,
|
||||
recipient: int,
|
||||
recipientNode: int,
|
||||
cryptographyInfo,
|
||||
dataSize: int = 128,
|
||||
wantFullResponse: bool = False,
|
||||
packetsClass: int = 0,
|
||||
|
@ -71,7 +72,10 @@ class Message:
|
|||
)
|
||||
self.packets = packets
|
||||
else:
|
||||
bytesObject = lzma.compress(bytesObject)
|
||||
# Data passed in by peers should already have been e2ee encrypted by SubtleCrypto
|
||||
# Transport encryption
|
||||
# bytesObject = lzma.compress(bytesObject, str(recipientNode).zfill(6), isDict=False)
|
||||
bytesObject = cryptographyInfo.encrypt(bytesObject, self.no)
|
||||
packets = []
|
||||
self.packetsID = random.randrange(0, 999999)
|
||||
pnum = 1
|
||||
|
|
|
@ -227,6 +227,7 @@ class Transceiver:
|
|||
senderName,
|
||||
recipient,
|
||||
recipientNode,
|
||||
self.cryptographyInfo,
|
||||
packetsClass=packetsClass,
|
||||
)
|
||||
for p in tp.packets:
|
||||
|
|
Loading…
Reference in New Issue