From ba9734e979962a172ff66d7ebbe75d5abc4931a2 Mon Sep 17 00:00:00 2001 From: Kashiko Koibumi Date: Wed, 15 May 2024 13:06:59 +0900 Subject: [PATCH] fix pubkey check It seems that one to one messaging using pubkey retrieving is not working yet. --- src/protocol.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/protocol.py b/src/protocol.py index 41e39a7c..b2103cd9 100644 --- a/src/protocol.py +++ b/src/protocol.py @@ -466,7 +466,7 @@ def decryptAndCheckPubkeyPayload(data, address): readPosition += varintLength # We'll store the address version and stream number # (and some more) in the pubkeys table. - storedData = data[20:readPosition] + storedData = bytes(data[20:readPosition]) if addressVersion != embeddedAddressVersion: logger.info( @@ -513,9 +513,9 @@ def decryptAndCheckPubkeyPayload(data, address): readPosition = 0 # bitfieldBehaviors = decryptedData[readPosition:readPosition + 4] readPosition += 4 - publicSigningKey = '\x04' + decryptedData[readPosition:readPosition + 64] + publicSigningKey = b'\x04' + decryptedData[readPosition:readPosition + 64] readPosition += 64 - publicEncryptionKey = '\x04' + decryptedData[readPosition:readPosition + 64] + publicEncryptionKey = b'\x04' + decryptedData[readPosition:readPosition + 64] readPosition += 64 specifiedNonceTrialsPerByteLength = decodeVarint( decryptedData[readPosition:readPosition + 10])[1]