环签名的两个重要操作

包含:

  • 生成
  • 验证

VerifyRCTSimple_Core

先做一些基础判断,然后准备数据,最后封装 MLSAG_Ver.

// NOTE the transaction must have been expanded earlier and must have a key image, mixring etc
// this is implementation of verRctMG from rctSigs.cpp file

封装了 MLSAG_Ver

Gen_RingCT_Simple

”转账(Create_TX_v2)“时,它是生成签名环节的一部分。

// this will prove  ringct signature
// message is the tx prefix hash
// inputs contain data of each and every input, together with the ring members and other data
// outputs contains the output amount and key to encode the amount
// fees is the fees to provide
// this function is equivalent to genRctSimple in rctSigs.cpp

原材料:
Message crypto.Hash, inputs []Input_info, outputs []Output_info, fees uint64
根据原材料,生成 RctSig

封装了 proveRctMGSimple

Gen_RingCT_Simple_BulletProof

”转账(Create_TX_v2)“时,它是生成签名环节的一部分。

// this will prove  ringct signature using bullet proof ranges
// message is the tx prefix hash
// inputs contain data of each and every input, together with the ring members and other data
// outputs contains the output amount and key to encode the amount
// fees is the fees to provide
// this function is equivalent to genRctSimple in rctSigs.cpp

原材料:
Message crypto.Hash, inputs []Input_info, outputs []Output_info, fees uint64
根据原材料,生成 RctSig

封装了 proveRctMGSimple

proveRctMGSimple

内部方法,供上面的两个 Gen_* 方法调用。

//Ring-ct MG sigs Simple
//   Simple version for when we assume only
//       post rct inputs
//       here pubs is a vector of (P, C) length mixin
//   inSk is x, a_in corresponding to signing index from the inputs
//       a_out, Cout is for the output commitment
//       index is the signing index..

封装了 MLSAG_Gen

results matching ""

    No results matching ""