12、格基密码学中的离散高斯采样器与层次化身份基内积功能加密综述

格基密码学关键技术解析

格基密码学中的离散高斯采样器与层次化身份基内积功能加密综述

离散高斯采样器相关内容

在格基密码学领域,离散高斯采样起着至关重要的作用。下面将介绍几种常见的离散高斯采样器。

Knuth - Yao采样器

Knuth - Yao采样器是一种重要的离散高斯采样算法。其具体步骤如下:

Algorithm 5. Knuth - Yao Sampler
Require: Three integers d, hit and ctr;
1: Discrete samplers of Gaussian distribution as matrix P with N × λ dimension and
N = τ × σ;
2: Sample bits uniformly in {0,1}, store in array r;
3: Column - wise Hamming distance of P, i.e., h_dist[j] = N
i = 0 P[i][j];
Ensure: d ←0; hit ←0; ctr ←0;
4: for int col ←0; col < λ; col ←col + 1 do
5:
    d ←2d + (!r[ctr + +]) −h_dist[col];
6:
    if d<0 then
7:
        for int row ←0; row < N; row ←row + 1 do
8:
            d ←d + P[row][col];
9:
            if d == 0 then
10:
      
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值