From aa2bebc2b4575d5313696618e75ee025e90d40b6 Mon Sep 17 00:00:00 2001 From: Bill Buchanan Date: Thu, 18 Feb 2021 21:40:06 +0000 Subject: [PATCH] Update README.md --- unit04_public_key/lab/README.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/unit04_public_key/lab/README.md b/unit04_public_key/lab/README.md index 8b276c6..ebb32b4 100644 --- a/unit04_public_key/lab/README.md +++ b/unit04_public_key/lab/README.md @@ -358,21 +358,22 @@ msg="Hello" type = 1 cur=NIST192p + sk = SigningKey.generate(curve=cur) vk = sk.get_verifying_key() -signature = sk.sign(msg) +signature = sk.sign(msg.encode()) -print "Message:\t",msg -print "Type:\t\t",cur.name -print "=========================" +print ("Message:\t",msg) +print ("Type:\t\t",cur.name) +print ("=========================") -print "Signature:\t",base64.b64encode(signature) +print ("Signature:\t",base64.b64encode(signature)) -print "=========================" +print ("=========================") -print "Signatures match:\t",vk.verify(signature, msg) +print ("Signatures match:\t",vk.verify(signature, msg.encode())) ``` What are the signatures (you only need to note the first four characters) for a message of “Bob”, for the curves of NIST192p, NIST521p and SECP256k1: