Unimodal_RS.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:Lattice-Based-Signatures 作者: krishnacharya 项目源码 文件源码
def KeyGen(n, m, k, d, q):
    '''
        input:
        q : polynomial size prime number
        n, m, k : dimensions specifiers
        d : SIS parameter, hardest instances are where d ~ q^(n/m)

        output:
        Signing Key S :  Matrix of dimension mxk with coefficients in [-d.d]
        Verification Key A : Matrix of dimension nxm with coefficients from [-(q-1)/2,(q-1)/2]
        T : the matrix AS ,it is used in the Verification of the signature

    '''
    S = crypt_secure_matrix(d, m, k)
    A = crypt_secure_matrix((q-1)/2, n, m)
    T = np.matmul(A, S)
    return S, A, T
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号