- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am implementing an SGX Attestation Service Provider using IPP Crypto.
I have derived a shared DH secret with the other party and now want to derive other keys from it using an AES CMAC.
The DH secret is stored in a BigNum while ippsAES_CMAC_UPDATE receives its input message through a pointer to a byte-stream.
Would just passing the BigNum pointer work? If not, is there another simple (preferably copy-free) way to get a pointer to a byte stream representing the number in little-endian format?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear customer,
You could use ippsGetOctString_BN to transfer big number to Ipp8u byte array. I am not sure which Big number class you are using, if you use IppsBigNumState type, there's no any problem.
But if you are using BigNumber, it is the class written by ourselves, source code are provided in appendix. I am afraid there's no exact sub-function for transferring BibNumber to String implemented in this class. Cause this class is only for setting bignumber & bignumber calculation. In the BigNumber class, the setting Bignumber function is actually use the same way of ippsSetOctString_BN. So, you'd better create IppsBigNumState type value by call NewIppBn, and then call ippsGetOctString_BN.
Or you could write a function by your self to split BigBumber string into 8 bits array(2 hex~1 byte). The BigNumber is actually an array that each element is 32*8bits. For more info, please refer to Big Number Arithmetic
Best regards,
Fiona
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear customer,
You could use ippsGetOctString_BN to transfer big number to Ipp8u byte array. I am not sure which Big number class you are using, if you use IppsBigNumState type, there's no any problem.
But if you are using BigNumber, it is the class written by ourselves, source code are provided in appendix. I am afraid there's no exact sub-function for transferring BibNumber to String implemented in this class. Cause this class is only for setting bignumber & bignumber calculation. In the BigNumber class, the setting Bignumber function is actually use the same way of ippsSetOctString_BN. So, you'd better create IppsBigNumState type value by call NewIppBn, and then call ippsGetOctString_BN.
Or you could write a function by your self to split BigBumber string into 8 bits array(2 hex~1 byte). The BigNumber is actually an array that each element is 32*8bits. For more info, please refer to Big Number Arithmetic
Best regards,
Fiona
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page