src/llmq/quorums_dummydkg.cpp
// The returned secret key vector is NOT SECURE AT ALL!!
// It is known by everyone. This is only for testnet/devnet/regtest, so this is fine. Also, we won't do any meaningful
// things with the commitments. This is only needed to make the final commitments validate
The returned secret key vector is NOT SECURE AT ALL
It is known by everyone. This is only for testnet/devnet/regtest, so this is fine. Also, we won't do any meaningful
things with the commitments. This is only needed to make the final commitments validate
The returned secret key vector is NOT SECURE AT ALL It is known by everyone . This is only for testnet / devnet / regtest so this is fine . Also we won ' t do any meaningful things with the commitments . This is only needed to make the final commitments validate
BLSSecretKeyVector CDummyDKG::BuildDeterministicSvec(Consensus::LLMQType llmqType, const uint256& quorumHash)
{
    const auto& params = Params().GetConsensus().llmqs.at(llmqType);
    CHash256 seed_;
    seed_.Write((unsigned char*)&llmqType, 1);
    seed_.Write(quorumHash.begin(), quorumHash.size());
    uint256 seed;
    seed_.Finalize(seed.begin());
    BLSSecretKeyVector svec;
    svec.reserve(params.size);
    for (size_t i = 0; i < params.threshold; i++) {
        CBLSSecretKey sk;
        while (true) {
            seed = ::SerializeHash(seed);
            sk.SetBuf(seed.begin(), seed.size());
            if (sk.IsValid()) {
                break;
            }
        }
        svec.emplace_back(sk);
    }
    return svec;
}
BLSSecretKeyVector CDummyDKG :: BuildDeterministicSvec ( Consensus :: LLMQType llmqType , const uint256 & quorumHash ) { const auto & params = Params ( ) . GetConsensus ( ) . llmqs . at ( llmqType ) ; CHash256 seed_ ; seed_ . Write ( ( unsigned char * ) & llmqType , 1 ) ; seed_ . Write ( quorumHash . begin ( ) , quorumHash . size ( ) ) ; uint256 seed ; seed_ . Finalize ( seed . begin ( ) ) ; BLSSecretKeyVector svec ; svec . reserve ( params . size ) ; for ( size_t i = 0 ; i < params . threshold ; i ++ ) { CBLSSecretKey sk ; while ( true ) { seed = :: SerializeHash ( seed ) ; sk . SetBuf ( seed . begin ( ) , seed . size ( ) ) ; if ( sk . IsValid ( ) ) { break ; } } svec . emplace_back ( sk ) ; } return svec ; }
The returned secret key vector is NOT SECURE AT ALL!!
The returned secret key vector is NOT SECURE AT ALL!!