-
Could someone MITM between Linux urandom and Gramine's private key generation function? Or does Gramine use an SGX primitive for entropy generation? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Gramine uses the RDRAND instruction as the sole source of entropy. Similarly, RA-TLS (which is not a part of Gramine core per se, but a library that is used together with Gramine) also uses the RDRAND instruction as the sole source of entropy. Since you're asking about RA-TLS, here are the RA-TLS specific code points:
As can be seen from the above code, no, Gramine and RA-TLS do not use Linux's unrandom. We rely purely on the HW primitives. |
Beta Was this translation helpful? Give feedback.
Gramine uses the RDRAND instruction as the sole source of entropy.
Similarly, RA-TLS (which is not a part of Gramine core per se, but a library that is used together with Gramine) also uses the RDRAND instruction as the sole source of entropy.
Since you're asking about RA-TLS, here are the RA-TLS specific code points:
gramine/subprojects/packagefiles/mbedtls/include/mbedtls/config-pal.h
Line 20 in fa437cb
MBEDTLS_ENTROPY_HARDWARE_ALT
macro that forces mbedTLS to use our own providedmbedtls_hardware_poll()
functiongramine/common/src…