# Setting up of polynomials for CP-ABE or KP-ABE Access Trees

My question I guess is how the selection is done. A brief explanation with a simple access tree will be very helpful.

• What do you mean by "selection"? Polynomials are randomly generated. – Artjom B. Jan 20 '16 at 22:34
• my bad, i used the wrong term there. What i mean to ask is the process. I know they are randomly generated with the degree being less than the threshold value for the node. I sort of understand the concept as it relates to a particular node or point on the access tree. What is still a bit confusing is the process for an actual access tree leading from the least leaf node to the root node to actually allow for decryption in the case of ABE and for encryption in the case of CP-ABE. Thanks – chisky Jan 20 '16 at 22:39

• "The point I was missing was the fact that the shares for each node are reshared for its child nodes." - This is basically what $q_x(0)=q_{parent(x)}(index(x))$ means. The secret is always the polynomial evaluated at 0: $P(0)$. – Artjom B. Jan 20 '16 at 23:21