- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I need to take the natural logarithm of a number, in such a way that access patterns and running time leak no information about the input/output.
Does the provided "cmath" standard library satisfy this criterion? If not, would you please point me to some literature on side-channel resistant real-valued computation?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This article suggests the usage of bitwise if possible
https://en.wikipedia.org/wiki/Timing_attack
Please see GNUC preliminary safety assessment for these math functions and their associated POSIX safety concepts before use:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your reply Hoang.
The Wikipedia article is of no use, since it only expounds on the concept of timing attacks. There is a brief reference to exponentiation, but not to its inverse.
The GNU documentation is not useful either, since it makes no reference to cryptographic security.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
are the section 6.2, 6.3 and 6.6 in this SGX document of your interest?
https://eprint.iacr.org/2016/086.pdf
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for getting back so quickly.
The paper by Costan and Devadas, although a great document (I personally started with SGX by reading it) doesn't help in this particular case.
What I need is a side-channel-resistant implementation of a (natural) logarithm.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you are just trying to stop an attack on measuring the processing time with different input and output, can you simply use the brute force approach by adding a small random number of wasted cycles in your processing in the Enclave such as taking a modulo of your secret hash number with a prime number? It will make the processing time undecodable.
Regarding to your natural logarithm, if you can substitute it with binary logarithm, then you can implement it with shift operations. Therefore, you don't need to include any math library.
If you do need to include math library, as long as you can statically link the library into your application, it is a good step to make sure it can be run inside the Enclave. Further security analysis of that library should be done to make sure it is still safe to call.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This research paper on Obfuscated Execution may be of your interest if you have not seen it
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page