Algorithm1
SCloudCPAPKE.KeyGen
- Input: None
- Output: (pk, sk)
- : 选择随机种子 seed_A
- : 使用随机种子生成随机矩阵 A ← Gen(seed_A) ∈ ℤ_q^{n×n}
- : 生成满足高斯分布的矩阵 S, E ← χ^{n×ñ}
- : 计算 B = AS + E
- : 返回公钥 pk ← (seed_A, B), 以及私钥 sk ← S
Algoithm2
SCloudCPAPKE.Enc
- Input: 消息m ∈ ℤ^{l_{e} } , 公钥 pk = (seed_A, B)
- Output: 密文 c
- : 使用随机种子生成随机矩阵 A ← Gen(seed_A) ∈ ℤ_q^{n×n}
- : 生成满足高斯分布的矩阵S’, E’ ← X^{\bar{m}\times n } , E’’ ←X^{\bar{m}\times \bar{n} }
- : 计算 B’ = S’A + E’ 以及 V = S’B + E’’ + Encode(m)
- : 返回密文 c ← (B’, V)
Algorithm3
SCloudCPAPKE.Dec
- Input: 密文 c = (B’, V) ∈ ℤ_q^{\bar{m}\times n } × ℤ_q^{\bar{m}\times \bar{n} }, 私钥 sk = S ∈ ℤ_q^{n\times \bar{n} }
- Output: 解密消息 m
- : 计算 D = V - B’S
- : 返回消息 m = Decode(D)