Coconut:可selective disclosure credentials的门限发行签名机制

1. 基本说明

2018年论文《Coconut: Threshold Issuance Selective Disclosure Credentials with Applications to Distributed Ledgers》,代码实现可见代码库

在这里插入图片描述
Coconut:可selective disclosure credentials的门限发行签名机制,允许多个声明聚合为一个身份说明。(allows partial claims to be aggregated into a single credential.)
最终的credential的大小为2个group element,与所包含的属性个数以及authorities/issuers的数量均无关。

Coconut支持reveal指定的message(s)。通过PoKOfSignature::init()函数中的revealed_msg_indices: HashSet<usize>参数来设置。
支持将message(s)设置为public (known_messages)和private(count_hiddent)。公开的消息用于计算共用参数h

let h = Self::compute_h(&commitment, &known_messages);

2. 安全性

Coconut基于pairing曲线,安全性取决于:
在这里插入图片描述

ProveCred步骤中增加了两个随机数r,r'(对应为PokOfSignatureinit()函数内的t,r变量),可解决verifier暴力破解的问题:
在这里插入图片描述

3. Coconut背后的技术

用到了:

  • 秘密共享原理(如下 ( x , y ) = ( v ( 0 ) , w ( 0 ) ) (x,y)=(v(0),w(0)) (x,y)=(v(0),w(0))对所有的authorities和users均不可知,在此环节支持threshold门限)。
  • sigma-protocol零知识证明原理。(用于vector commitment proof等等,见https://github.com/lovesh/ps-sig/blob/master/src/pok_vc.rs
  • 盲签名技术。(见PrepareBlindSignBlindSignUnblind流程实现细节)。
    在这里插入图片描述

Coconut主要特征对比:
在这里插入图片描述

4. 秘密共享中的lagrange插值实现


  • Lagrange插值系数计算公式为:(针对的点集分别为 ( 1 , x 1 ) , ( 2 , x 2 ) , . . . , ( t − 1 , x t − 1 ) , ( t , x t ) (1,x_1),(2,x_2),...,(t-1,x_{t-1}), (t,x_{t}) (1,x1),(2,x2),...,(t1,xt1),(t,xt) ( 0 , x 0 ) (0,x_0) (0,x0)和为 ( 1 , y 1 ) , ( 2 , y 2 ) , . . . , ( t − 1 , y t − 1 ) , ( t , y t ) (1,y_1),(2,y_2),...,(t-1,y_{t-1}),(t,y_{t}) (1,y1),(2,y2),...,(t1,yt1),(t,yt) ( 0 , y 0 ) (0,y_0) (0,y0)

l i = [ ∏ i = 1 , j ! = i t ( 0 − j ) ] [ ∏ i = 1 , j ! = i t ( i − j ) ] − 1 = [ ∏ i = 1 , j ! = i t ( j ) ] [ ∏ i = 1 , j ! = i t ( j − i ) ] − 1 l_i=[\prod_{i=1,j!=i}^{t}(0-j)][\prod_{i=1,j!=i}^{t}(i-j)]^{-1}=[\prod_{i=1,j!=i}^{t}(j)][\prod_{i=1,j!=i}^{t}(j-i)]^{-1} li=[i=1,j!=it(0j)][i=1,j!=it(ij)]1=[i=1,j!=it(j)][i=1,j!=it(ji)]1

从而有 x 0 = ∑ i = 1 t l i x i , y 0 = ∑ i = 1 t l i y i x_0=\sum_{i=1}^{t}l_ix_i, y_0=\sum_{i=1}^{t}l_iy_i x0=i=1tlixi,y0=i=1tliyi

详细的代码实现见:https://github.com/lovesh/secret-sharing-schemes/blob/master/src/polynomial.rs

	 /// Return the Lagrange basis polynomial at x = 0 given the x coordinates
    pub fn lagrange_basis_at_0(x_coords: HashSet<usize>, i: usize) -> FieldElement {
        let mut numerator = FieldElement::one();
        let mut denominator = FieldElement::one();
        let i_as_field_elem = FieldElement::from(i as u64);
        let neg_i = -i_as_field_elem; // -i
        for x in x_coords {
            if x == i {
                continue;
            }
            // numerator = numerator * x
            let x_as_field_elem = FieldElement::from(x as u64);
            numerator = &numerator * &x_as_field_elem;
            let x_minus_i = &x_as_field_elem + &neg_i;
            // denominator = denominator * (x - i)
            denominator = &denominator * &x_minus_i;
        }
        denominator.inverse_mut();
        // (x_coords[0]) * (x_coords[1]) * ... / ((x_coords[0] - i) * (x_coords[1] - i) * ...)
        numerator * denominator
    }

5. Coconut的实现流程

基本的流程如下:
在这里插入图片描述
在这里插入图片描述

参考资料:
[1] 2018年论文《Coconut: Threshold Issuance Selective Disclosure Credentials with Applications to Distributed Ledgers
[2] 代码库:https://github.com/lovesh/coconut-rust
[3] 博客盲签名 blind signature 简介

  • 2
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值