From 9cd7bc083cb4db18237cb960208eb3ffdd8a2079 Mon Sep 17 00:00:00 2001 From: jMyles Date: Sun, 11 Feb 2018 01:00:39 -0800 Subject: [PATCH] Signature concat needs to be cummatative. --- nkms/crypto/signature.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nkms/crypto/signature.py b/nkms/crypto/signature.py index 5817d8904..bc288e5d8 100644 --- a/nkms/crypto/signature.py +++ b/nkms/crypto/signature.py @@ -16,7 +16,7 @@ class Signature(object): def __repr__(self): return "ECDSA Signature: {}".format(bytes(self).hex()[:15]) - def verify(self, message: bytes, pubkey: UmbralPublicKey) -> bool: + def verify(self, message: bytes, pubkey: UmbralPublicKey=None) -> bool: """ Verifies that a message's signature was valid. @@ -53,4 +53,6 @@ class Signature(object): def __add__(self, other): return bytes(self) + other - __radd__ = __add__ + + def __radd__(self, other): + return other + bytes(self)