Hi Will,
On 01.02.25 01:16, Will Adair wrote:
> Hi Steffen, apologies for the slow response.
no worries.
> I'm actually trying to implement the functionality from here:
> Specification of Secure Hardware Extensions
> <
https://www.autosar.org/fileadmin/standards/R22-11/FO/AUTOSAR_TR_SecureHardwareExtensions.pdf>
>
> Particularly the Miyaugchi-Praneel Compression function in chapter 4.3.3
> which is similar in nature to the CHC, but not quite the same.
>
> I'll let you know if I am successful in implementing it. I have not been
> able to recreate the test vector in chapter 4.13.2.4, even using AES-128
> in ECB mode directly.
I just tried it out and it's possible.
> cipher_hash_test....state in contents:
> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ........ ........
> buf contents:
> 6B C1 BE E2 2E 40 9F 96 E9 3D 7E 11 73 93 17 2A | k....@.. .=~.s..*
> state out contents:
> A4 EF 1D 68 3C 7B 7D 91 8C D6 F2 4D 25 59 E5 0E | ...h<{}. ...M%Y..
> state in contents:
> A4 EF 1D 68 3C 7B 7D 91 8C D6 F2 4D 25 59 E5 0E | ...h<{}. ...M%Y..
> buf contents:
> AE 2D 8A 57 1E 03 AC 9C 9E B7 6F AC 45 AF 8E 51 | .-.W.... ..o.E..Q
> state out contents:
> 19 76 AE D1 8C 2F 37 46 16 5E 5D E2 C4 C5 D4 46 | .v.../7F .^]....F
> state in contents:
> 19 76 AE D1 8C 2F 37 46 16 5E 5D E2 C4 C5 D4 46 | .v.../7F .^]....F
> buf contents:
> 80 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 | ........ ........
> state out contents:
> C7 27 7A 0D C1 FB 85 3B 5F 4D 9C BD 26 BE 40 C6 | .'z....; _M..&.@.
> tmp contents:
> C7 27 7A 0D C1 FB 85 3B 5F 4D 9C BD 26 BE 40 C6 | .'z....; _M..&.@.
> passed 346.836ms
You're right, it's only a slight deviation of CHC and I've not decided
for myself yet, whether it's only a variant of CHC or an entirely
separate implementation.
Feel free to get back if you have questions (or with your version of the
implementation) :)
Cheers
Steffen