I'm reading about the Schnorr's zero-knowledge proof for DLOG and the Sigma protocol for DH tuple proof, and I want to know how one applies Fiat-Shamir transform to both of them, to turn them into NIZK proofs.
I know that Prover would need to hash some public parameters to get the challenge, and then compute a proof for that challenge, so that the Verifier can also compute the same challenge using the hash from the public values, and can verify the proof, and there is no interaction between them. But, which of the public parameters one needs to hash to get a challenge? More precisely, how does the challenge look in NIZK proof, and is the proving and verification steps left the same? Also is the security guaranteed due to the random oracle model and usage of hash functions or there is something else going on in the NIZK proofs?