# Trapdoor implementation

Please refer to this secure index paper. On page#6, a trapdoor is defined as

Trapdoor(Kpriv, w): Given the master key  Kpriv = (k1, … , kr) and word w,
output the trapdoor for word w as:     Tw = (f(w, k1), … , f(w, kr))


Can someone please explain it to me using an example?

Let's say we've a word hello for which we want to generate a trap door. So, do I first encrypt it with k1 and then take its hash. And do the same with key k2, k3 etc. Once we have all the hashes, simple concatenate them. Is my understanding correct?

-

From the paper, $f$ is a pseudo-random function that produces a result of $s$ bits.
You can think of the master key as a vector of $r$ values each $s$ bits long and for pedagogical purposes I'm sure the trapdoor for $w$ could be thought of as the result of hashing the concatenation of each key value $k$ with the word $w$.