[U-Boot] Modulos and rsquared in rsa-verify.c

Bondugula, Naga Raju Rajesh nbondugu at amazon.com
Mon Sep 17 19:40:01 UTC 2018


Hi team,

I am trying to use rsa utility functions and need help in using modulus and rsquared in right format

Say this is modulus that I need to incorporate.
How should the modules buffer look like?

modulus:

    00:d8:63:96:ce:e5:ec:04:af:17:83:f2:54:e3:49:

    f1:27:26:31:48:fc:43:78:8a:fd:35:5c:ba:05:77:

    d9:ca:df:61:8c:65:a5:9c:8c:b1:09:c6:2e:81:cd:

    2d:14:a4:72:1a:2b:1c:ed:bf:fc:4e:47:87:e8:94:

    50:12:34:c7:5b


There are 4 possible options. (considering all orders).
Which is the right way to use modulus value. I plan to hardcode in the code instead of using I from dtsi (for testing)


  1.  Ptr[0] wil have digits with highest value
Uint32_t *ptr = {0xd86396ce, …., …., …. , 0x1234c75b}


  1.  Same as 1) but with different endian ness.
Uint32_t *ptr = {0xce9663d8, …, …, …, 0x5bc73412}


  1.  pre[0] will have digits with lowest value.
Uint32_t *ptr = {0x1234c75b, …., …., …. , 0xd86396ce }


  1.  Same as 3) but with different endian ness.
Uint32_t *ptr = {0x5bc73412, …, …, …, 0xce9663d8}




More information about the U-Boot mailing list