Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <006301cd7212$3ff8f330$bfead990$@net>
Date: Sat, 4 Aug 2012 02:24:56 -0500
From: "jfoug" <jfoug@....net>
To: <john-dev@...ts.openwall.com>
Subject: RE: SHA-384 support in Jim's SHA2 code

>From sha2.h

#define SHA512_CTX           sha512_ctx
#define SHA384_Init(a)       sha512_init(a,0)
#define SHA512_Init(a)       sha512_init(a,1)
#define SHA512_Update(a,b,c) sha512_update(a,b,c)
#define SHA384_Update(a,b,c) sha512_update(a,b,c)
#define SHA512_Final(a,b)    sha512_final(a,b)
#define SHA384_Final(a,b)    sha512_final(a,b)

Simply use a SHA512_CTX, and then use the SHA384_Init(), SHA384_Update() and
SHA384_Final()

To be honet, the only one that 'really' matters is SHA384_Init().  The other
2 are 100% the same (small changes to final, in the 'inside', but it uses
whatever was set by the init).   The init uses a different IV between
384/512 and sets a flag that is later used in Final.

But it 100% works with either 384/512.

Jim.

>From: Dhiru Kholia [mailto:dhiru.kholia@...il.com]
>
>On Sat, Aug 4, 2012 at 12:23 PM, jfoug <jfoug@....net> wrote:
>> All sha2 types are there (224, 256, 384 and 512).
>>
>> To use 384, you have to use a SHA512_CTX, but call it with the sha384
>> functions
>
>There are no sha384* functions in sha2.c. I think I can use
>ctx->bIs512 flag to use sha384. Thanks!
>
>--
>Cheers,
>Dhiru

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.