Re: SHA-2 / SHA512 - tips anyone?
Posted: Wed Mar 22, 2017 9:05 am
by concord
Oops, got it working on Jade7.0, then realised I shouldn't use an Integer64 parameter on Jade6.3 (32bit) system.
Thanks so much for all your help, with a bit of luck I'm hoping to be able to follow your tips and generate the HMAC function, then I'm away

Re: SHA-2 / SHA512 - tips anyone?
Posted: Wed Mar 22, 2017 7:07 pm
by murray
Good work! I was about to suggest that you check the length parameter. My short example had neither applicationServerExecution or presentationClientExecution, and was written on Jade 7.0 64-bit.
After a quick revision on HMAC it would seem that the block size is tied to the internal block size of the hash function. So SHA-512 has twice the block size of SHA-256. I would expect that everything gets scaled accordingly. Keys shorter than the block size are always padded to fill exactly one block with zeros. The inner padding #[36 36 36...36 36] and outer padding #[5C 5C 5C 5C...5C 5C] will have to be scaled to the bigger block size. However, you should check what specification you are writing to, in case there's any variation on that.