Docs link fix #78
|
@ -6,13 +6,13 @@ This is the monorepo for PierMesh.
|
||||||
|
|
||||||
# Docs
|
# 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
|
# How to use
|
||||||
|
|
||||||
Note: these instructions will probably only work on Linux at the moment
|
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/)
|
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
|
Make sure you have the latest Python installed
|
||||||
|
|
|
@ -257,6 +257,7 @@ class DHEFern:
|
||||||
"""
|
"""
|
||||||
return os.urandom(16)
|
return os.urandom(16)
|
||||||
|
|
||||||
|
# TODO: Build in transport security (node/node)
|
||||||
def encrypt(self, data, nodeID: str, isDict: bool = True):
|
def encrypt(self, data, nodeID: str, isDict: bool = True):
|
||||||
"""
|
"""
|
||||||
Do Fernet encryption
|
Do Fernet encryption
|
||||||
|
|
|
@ -27,6 +27,7 @@ class Message:
|
||||||
senderDisplayName: int,
|
senderDisplayName: int,
|
||||||
recipient: int,
|
recipient: int,
|
||||||
recipientNode: int,
|
recipientNode: int,
|
||||||
|
cryptographyInfo,
|
||||||
dataSize: int = 128,
|
dataSize: int = 128,
|
||||||
wantFullResponse: bool = False,
|
wantFullResponse: bool = False,
|
||||||
packetsClass: int = 0,
|
packetsClass: int = 0,
|
||||||
|
@ -71,7 +72,10 @@ class Message:
|
||||||
)
|
)
|
||||||
self.packets = packets
|
self.packets = packets
|
||||||
else:
|
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 = []
|
packets = []
|
||||||
self.packetsID = random.randrange(0, 999999)
|
self.packetsID = random.randrange(0, 999999)
|
||||||
pnum = 1
|
pnum = 1
|
||||||
|
|
|
@ -227,6 +227,7 @@ class Transceiver:
|
||||||
senderName,
|
senderName,
|
||||||
recipient,
|
recipient,
|
||||||
recipientNode,
|
recipientNode,
|
||||||
|
self.cryptographyInfo,
|
||||||
packetsClass=packetsClass,
|
packetsClass=packetsClass,
|
||||||
)
|
)
|
||||||
for p in tp.packets:
|
for p in tp.packets:
|
||||||
|
|
Loading…
Reference in New Issue