Browse Source

fixed bug in tag-check code so it actually checks the tag

cecylia 7 years ago
parent
commit
2a0d9573b8
1 changed files with 1 additions and 1 deletions
  1. 1 1
      relay_station/crypto.c

+ 1 - 1
relay_station/crypto.c

@@ -1545,7 +1545,7 @@ int check_tag(byte key[16], const byte privkey[PTWIST_BYTES],
 
     /* Create the hash tag keys */
     memmove(sharedsec+PTWIST_BYTES, context, context_len);
-    SHA256(sharedsec, PTWIST_BYTES, taghashout);
+    SHA256(sharedsec, PTWIST_BYTES + context_len, taghashout);
 
 #if PTWIST_PUZZLE_STRENGTH > 0
     /* Construct the proposed solution to the puzzle */