Web forum is in read-only mode. Login as active registered customer for write access
  Forum Search   New Posts New Posts

TSHA3Hash.TupleHash

 Post Reply Post Reply
Author
Asplund Carl View Drop Down
New Member
New Member
Avatar

Joined: 04 Jul 2012
Posts: 13
Post Options Post Options   Quote Asplund Carl Quote  Post ReplyReply Direct Link To This Post Topic: TSHA3Hash.TupleHash
    Posted: 19 Oct 2018 at 6:15am
Hi, 

Please help with a possibly wrong assumption:

Environment
Win10 - Latest Update
CryptoGraphy v3.2.0.0

Using TSHA3Hash with the following

     strings MyTuple1, MyTuple2, MyTuple3, MySalt only once...

    { Create First Hash }
    TSHA3Hash .Create;

      AType := txof;
      OutputFormat := hexa;
      hashSizeBits := 128;
      version := 512;
     
       MyHash1 := TupleHash([MyTuple1, MyTuple2, MyTuple3], MySalt);

      TSHA3Hash .Free;

    { Create second hash using identical values }
     Create;

      AType := txof;
      OutputFormat := hexa;
      hashSizeBits := 128;
      version := 512;
     
       MyHash2:= TupleHash([MyTuple1, MyTuple2, MyTuple3], MySalt);

      TSHA3Hash.Free;

      MyHash1 does not equal MyHash2.

     Is this normal?

     When I use Hash or KMACHash, My Hash1 and MyHash2 are equal...

    Thanks for your help.






Back to Top
Marion Candau View Drop Down
Member
Member
Avatar

Joined: 12 Aug 2016
Posts: 77
Post Options Post Options   Quote Marion Candau Quote  Post ReplyReply Direct Link To This Post Posted: 22 Oct 2018 at 9:30am
Hello Carl,
Do you have example values for MyTuple1, MyTuple2, MyTuple3 and MySalt?
Best regards,
Marion
Back to Top
Asplund Carl View Drop Down
New Member
New Member
Avatar

Joined: 04 Jul 2012
Posts: 13
Post Options Post Options   Quote Asplund Carl Quote  Post ReplyReply Direct Link To This Post Posted: 23 Oct 2018 at 4:53pm
Back to Top
Asplund Carl View Drop Down
New Member
New Member
Avatar

Joined: 04 Jul 2012
Posts: 13
Post Options Post Options   Quote Asplund Carl Quote  Post ReplyReply Direct Link To This Post Posted: 23 Oct 2018 at 5:35pm


Tuple1 = '1234'

Tuple2 = 'ABCD'

Tuple3 = '5678'

Salt = 'EpFSQpEw/NLh/ZZUgxVcDj08DOs+JqUZ70D9QKXygkAVyigOOgRDC7TLU/fuuuMZ'

with TSHA3Hash

      AType := txof;
      OutputFormat := base64;
      hashSizeBits := 128;
      version := 512;

TSHA3Hash is created , method TupleHash called,  and freed, twice...

Attempt 1: MyHash1 = 'LW5TxOPlF2yrbyNBaVZ8FQ=='

Attempt 2: MyHash2 = 'zGLvUlNpMD5TW+3ZXlKQvw=='

So the two hash values are different, is this normal? There seems to be some random factor (?)


I attached a zip file with the small form unit in the reply to the e-mail notification. I didn't see how to do it in the forum.

Thanks.

Back to Top
Marion Candau View Drop Down
Member
Member
Avatar

Joined: 12 Aug 2016
Posts: 77
Post Options Post Options   Quote Marion Candau Quote  Post ReplyReply Direct Link To This Post Posted: 24 Oct 2018 at 8:54am
Hi Carl,

I do not have this issue with TMS CP v3.2.0.1, as you can see in the picture below.


Which version do you have?

Best regards,
Marion

Back to Top
Asplund Carl View Drop Down
New Member
New Member
Avatar

Joined: 04 Jul 2012
Posts: 13
Post Options Post Options   Quote Asplund Carl Quote  Post ReplyReply Direct Link To This Post Posted: 24 Oct 2018 at 2:32pm
Due to a persistent, random Rad Studio (10.2.3) RTL250.bpl A/V problem in the IDE, I uninstalled/cleaned/reinstalled Rad Studio and got the latest versions from 3rd parties and reinstalled them too, including CryptoGraphic. This was within the last 14 days.

I downloaded the latest version, but it shows I have installed 3.1.0.2 (?). I will download again and
uninstall, clean registry and install. I will also check my directories. I may have installed an earlier version by mistake, but I don't see how.

After I am done, I will update on forum. Thx.
Back to Top
Asplund Carl View Drop Down
New Member
New Member
Avatar

Joined: 04 Jul 2012
Posts: 13
Post Options Post Options   Quote Asplund Carl Quote  Post ReplyReply Direct Link To This Post Posted: 24 Oct 2018 at 3:26pm
That seems to have solved the problem. Thanks for your help.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down