Skip to main content
. 2024 Feb 5;24(3):1035. doi: 10.3390/s24031035
Algorithm 1: SetupidiQU,pp
// Params: identity of terminal member idi
// Returns: public key QU and public parameters pp
function GeneratePublicKeyAndParams(char[] idi) → {QU, pp}
01: // Step (i): Select large prime numbers and corresponding groups
02: p = selectLargePrime ()
03: q = selectLargePrime ()
04: G1 = selectBilinearGroupOfOrder (p)
05: G2 = selectCyclicGroupOfOrder (q)
06: g1 = G1.generator () // Generator of G1
07: g2 = G2.generator () // Generator of G2
08: // Step (ii): Define bilinear map
09: e = defineBilinearMap (G1, G1, GT)
10: // Step (iii): Select hash functions
11: H1 = hashFunction ({0,1}*, G1)
12: H2 = hashFunction ({0,1}*, G2)
13: // Compute public key for terminal member ui
14: QU=H1idi
15: // Step (iv): Select random number α and compute private key for terminal member ui
16: α = selectRandomFromZpStar (p)
17: SU=αQU
18: // Step (v): Compute u and set public parameters
19: u=e(g1,g1)α
20: pp=G1,g1,H1,H2,QU,u
21: // Return public key and parameters
22: return {QU, pp}
endfunction