Summary In many scientific applications, researchers aim to relate a response variable $Y$ to a set of potential explanatory variables $X = (X_1,\dots,X_p)$, and start by trying to identify variables that contribute to this relationship. In statistical terms, this goal can be understood as trying to identify those $X_j$ on which $Y$ is conditionally dependent. Sometimes it is of value to simultaneously test for each $j$, which is more commonly known as variable selection. The conditional randomization test, CRT, and model-X knockoffs are two recently proposed methods that respectively perform conditional independence testing and variable selection by computing, for each $X_j$, any test statistic on the data and assessing that test statistic’s significance, by comparing it with test statistics computed on synthetic variables generated using knowledge of the distribution of $X$. The main contribution of this article is the analysis of the power of these methods in a high-dimensional linear model, where the ratio of the dimension $p$ to the sample size $n$ converges to a positive constant. We give explicit expressions for the asymptotic power of the CRT, variable selection with CRT $p$-values, and model-X knockoffs, each with a test statistic based on the marginal covariance, the least squares coefficient or the lasso. One useful application of our analysis is direct theoretical comparison of the asymptotic powers of variable selection with CRT $p$-values and model-X knockoffs; in the instances with independent covariates that we consider, the CRT probably dominates knockoffs. We also analyse the power gain from using unlabelled data in the CRT when limited knowledge of the distribution of $X$ is available, as well as the power of the CRT when samples are collected retrospectively.