Skip to content

0.6 candidate patterns #81

@NoHatCoder

Description

@NoHatCoder

I have searched for a new pattern for input digestion, the the goal for the input pattern is that there should be no simple way for a pattern of differences to cancel out. I have a tool that tries to estimate how simple the simplest pattern is, it delivers results in number of lanes where 4 bytes cancel out.

The following pattern scores 5 cancellations. Each round digests 32 bytes of input, denoted as IN0 and IN1:

XMM6+=IN1
XMM4^=IN0
XMM4=AES(XMM4,XMM1)
XMM2+=IN0
XMM1^=IN1
XMM1=AES(XMM1,XMM5)
//Next round, shift pattern over by 1
XMM7+=IN1
XMM5^=IN0
...

Another slightly more expensive pattern scores 11 cancellations:

XMM6+=IN0
XMM3^=IN1
XMM3=AES(XMM3,XMM6)
XMM6^=IN1
XMM6=AES(XMM6,XMM1)
XMM1^=IN0
XMM1=AES(XMM1,XMM7)

Both patterns are designed so that an ARM version can use the pre-aes xor to replace an xor input instruction, and then add in an xor after the aes.

The first pattern could be used for a level 1 function similar to 0.5, the second, while as best i can tell not quite reaching 128 bits of adversarial resistance, might still be practically good enough for hardening hash tables.

To get higher hash levels I'm also tinkering with looping over the input in large blocks (~1KiB).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions