Catalyzes the sulfuryl group transfer from 3'-phosphoadenosine-5'-phosphosulfate (PAPS) to trehalose, leading to trehalose-2-sulfate (T2S). The sulfation of trehalose is the first step in the biosynthesis of sulfolipid-1 (SL-1), a major cell wall glycolipid in pathogenic mycobacteria. Cannot use free glucose and unnatural stereoisomers of trehalose (alpha,beta (neo-trehalose) and beta,beta (iso-trehalose)) as substrates. 3'-phosphoadenylyl sulfate + alpha,alpha-trehalose = 2-O-sulfo-alpha,alpha-trehalose + adenosine 3',5'-bisphosphate + H(+) kcat is 1.6 sec(-1) (PubMed:15258569). kcat is 134 min(-1) toward trehalose and 96 min(-1) toward PAPS (PubMed:15866533). Glycolipid metabolism. Homodimer. Loss of trehalose-2-sulfate (T2S) formation. The reaction catalyzed by Stf0 follows a rapid equilibrium random sequential Bi-Bi mechanism with formation of a ternary complex intermediate. Belongs to the Stf0 sulfotransferase family.