上一篇介绍了什么是同态隐藏。假设取 E ( x ) = g x E(x) = g^x E(x)=gx,则 E ( x + y ) E(x+y) E(x+y)可以通过 E ( x ) E(x) E(x)和 E ( y ) E(y) E(y)计算出来:
E ( x + y ) = E ( x ) ⋅ E ( y ) E(x+y) = E(x) \cdot E(y) E(x+y)=E(x)⋅E(y)
实际上,不仅仅支持加法,支持所有"线性组合"的同态隐藏,比如 E ( a x + b y ) E(ax + by) E(ax+by):
E ( a x + b y ) = g a x + b y = g a x ⋅ g b y = ( g x ) a ⋅ ( g y ) b = E ( x ) a ⋅ E ( y ) b E(ax+by) = g^{ax+by} = g^{ax} \cdot g^{by} = (g^x)^a \cdot (g^y)^b = E(x)^a \cdot E(y)^b E(ax+by)=gax+by=gax⋅gby=(gx)a⋅(gy)b=E(x)a⋅E(