Bumping this because I also had this question and I found the answer to it.
1. What determines the target compute time?
(examples: number of AES rounds, key stretching derivations, etc.)
The target compute time is user set and 250 ms by default, Armory uses a KDF with SHA512, and a salt generated somewhere, to implement the intensity in the wallet encryption, and the KDF's parameters are calculated
here. The compute time influences the number of iterations, and the amount of memory that it'll use, which is itself limited by the memory limit that you set (by default 32MB).
2. From my limited testing, it seems like raising the target compute time increases the required unlock memory. In fact, I went and did more doublings of target compute times, and it seems like for every doubling in compute time, the unlock memory doubles as well. What is the reasoning behind this?
Inside the KDF parameter calculation code I linked, there is a loop that looks for the optimal amount of KDF blocks (and hence memory) to use for the KDF. This is doubled each time in the loop, which roughly doubles the amount of time KDF takes:
// Start the search for a memory value at 1kB
memoryReqtBytes_ = 1024;
double approxSec = 0;
while(approxSec <= targetComputeSec/4 && memoryReqtBytes_ < maxMemReqts)
{
memoryReqtBytes_ *= 2;
sequenceCount_ = memoryReqtBytes_ / hashOutputBytes_;
lookupTable_.resize(memoryReqtBytes_);
TIMER_RESTART("KDF_Mem_Search");
testKey = DeriveKey_OneIter(testKey);
TIMER_STOP("KDF_Mem_Search");
approxSec = TIMER_READ_SEC("KDF_Mem_Search");
}
Eventually there comes a breaking point where increasing the target compute time doesn't make the KDF take much longer because the memory limit in place will limit the amount of memory KDF can use, making the encryption process more memory-bound than time-bound.