环签名(之一)

数据结构,用 MlsagSig 表示。

学术名 MLSAGs,全称 Multilayered Spontaneous Anonymous Group Signatures (MLSAG signatures)

这里有其核心实现,包括完整的算法:

  • 生成
  • 验证

Get_pre_mlsag_hash

处理,获得 Message(原始消息)。

final_data_hash = message_hash + base_hash + other_data_hash

// this file has license pending  since it triggers a hard to find golang bug TODO add license after the golang bug is fixed
/* This file implements MLSAG signatures for the transactions */

// get the hash of the transaction which is used to create the mlsag later on, this hash is input to MLSAG
// the hash is = hash( message + hash(basehash) + hash(pederson and borromean data))

MLSAG_Ver

环签名的验证。

//Multilayered Spontaneous Anonymous Group Signatures (MLSAG signatures)
//This is a just slghtly more efficient version than the ones described below
//(will be explained in more detail in Ring Multisig paper
//These are aka MG signatutes in earlier drafts of the ring ct paper
// c.f. http://eprint.iacr.org/2015/1098 section 2.
// keyImageV just does I[i] = xx[i] * Hash(xx[i] * G) for each i
// Gen creates a signature which proves that for some column in the keymatrix "pk"
//   the signer knows a secret key for each row in that column
// Ver verifies that the MG sig was created correctly

在 Dero 里,它有两个出口。

MLSAG_Gen

环签名的生成。

交易的签名方式,这是最核心的算法。

MLSAG_Gen(message crypto.Key, pk [][]crypto.Key, xx []crypto.Key, index int, dsRows int) (rv MlsagSig)

//Multilayered Spontaneous Anonymous Group Signatures (MLSAG signatures)
//This is a just slghtly more efficient version than the ones described below
//(will be explained in more detail in Ring Multisig paper
//These are aka MG signatutes in earlier drafts of the ring ct paper
// c.f. http://eprint.iacr.org/2015/1098 section 2.
// keyImageV just does I[i] = xx[i] * Hash(xx[i] * G) for each i
// Gen creates a signature which proves that for some column in the keymatrix "pk"
//   the signer knows a secret key for each row in that column
// Ver verifies that the MG sig was created correctly

属于密码学范畴,和具体业务无关。

在 Dero 里,它有一个出口。

results matching ""

    No results matching ""