Преглед на файлове

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

cecylia преди 7 години
родител
ревизия
2a0d9573b8
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  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 */