in question 4 we've been told to "pick at random e and d" but in the description of the RSA scheme, in lect.7 slide #11 we've learned that "Bob picks an integer e that is relatively prime to
φ(m) = (p − 1) · (q − 1). This does not have to be random or large".
What the right strategy of selecting appropriate e and d?
If we really should pick them both at random, as we've been told in question 4, is there an efficient way to find such d as asked, using only random?
It seems fairly easy to find at random some number e that is relative prime to φ(m) and so it holds for d, but after such e and d are selected, checking whether (e * b) == 1 mod φ(m) rather fails.
Is there an option to select only e at random and calculate d based on the values of e and φ(m) we already know, or maybe just chose them both without randomization, like it's told in the lecture 7?