I have a doubt regarding MRENCLAVE. Suppose two different enclaves have same code, data, heap, everything. They only differ at MRSIGNER. Will the MRENCLAVE be same for both of them ? What if, these two enclaves are loaded at exactly same BASEADDR and the whole address layout is same. In that case, while calculating MRENCLAVE, SECS pages are not taken into account (which are the only pages which will be different in my opinion), so my guess is MRENCLAVE can be same for both of them
If yes, then dont we have a problem, because seal keys based on enclave identity will generate same keys, right ? Then one enclave's secret can be accessible by different enclave. What am I missing here ?