Hi,

Has anyone actually worked on those elements? I just tried the HMAC,
and couldn't get it to match my other implementation. On quick browse,
it looks like it's using wrong constant in few places (SHA_BLOCK where
SHA_CBLOCK should be?). Haven't really tried this yet -- will return
to issue next week...



@@ -97,12 +97,12 @@ void HMAC_Init_ex(HMAC_CTX *ctx, const void *key, 
int len)
                for (i=0; i<HMAC_MAX_MD_CBLOCK; i++)
                        pad[i]=0x36^ctx->key[i];
                SHA1_init(&ctx->i_ctx);
-               SHA1_update(&ctx->i_ctx,pad,SHA_BLOCK);
+               SHA1_update(&ctx->i_ctx,pad,SHA_CBLOCK);

                for (i=0; i<HMAC_MAX_MD_CBLOCK; i++)
                        pad[i]=0x5c^ctx->key[i];
                SHA1_init(&ctx->o_ctx);
-               SHA1_update(&ctx->o_ctx,pad,SHA_BLOCK);
+               SHA1_update(&ctx->o_ctx,pad,SHA_CBLOCK);
                }
        memcpy((void *)&ctx->md_ctx,(void*)&ctx->i_ctx,sizeof(SHA1_ctx));
        }

_______________________________________________
click mailing list
[email protected]
https://amsterdam.lcs.mit.edu/mailman/listinfo/click

Reply via email to