Browse Source

core/crypto/poly1305: Relax the tag length check on the verify helper

Yawning Angel 1 year ago
parent
commit
56516ee8b2
1 changed files with 0 additions and 4 deletions
  1. 0 4
      core/crypto/poly1305/poly1305.odin

+ 0 - 4
core/crypto/poly1305/poly1305.odin

@@ -23,10 +23,6 @@ verify :: proc (tag, msg, key: []byte) -> bool {
 	ctx: Context = ---
 	ctx: Context = ---
 	derived_tag: [16]byte = ---
 	derived_tag: [16]byte = ---
 
 
-	if len(tag) != TAG_SIZE {
-		panic("crypto/poly1305: invalid tag size")
-	}
-
 	init(&ctx, key)
 	init(&ctx, key)
 	update(&ctx, msg)
 	update(&ctx, msg)
 	final(&ctx, derived_tag[:])
 	final(&ctx, derived_tag[:])