Author

Topic: What is bnTrustedModulus.SetHex (Read 1188 times)

legendary
Activity: 882
Merit: 1000
August 16, 2014, 09:24:02 PM
#3
I ran into this bnTrustedModulus.SetHex("d01f952e1090a5a72a3eda261083256596ccc1929...................................... .............

and am wondering what it is, how it works.

"Trusted modulus", a parameter required
by zerocoin library to prevent double spend.

https://github.com/Zerocoin/libzerocoin/wiki/Generating-Zerocoin-parameters

Many thanks Smiley
legendary
Activity: 996
Merit: 1013
August 16, 2014, 06:14:24 PM
#2
I ran into this bnTrustedModulus.SetHex("d01f952e1090a5a72a3eda261083256596ccc1929...................................... .............

and am wondering what it is, how it works.

"Trusted modulus", a parameter required
by zerocoin library to prevent double spend.

https://github.com/Zerocoin/libzerocoin/wiki/Generating-Zerocoin-parameters
legendary
Activity: 882
Merit: 1000
August 16, 2014, 08:59:18 AM
#1
I ran into this bnTrustedModulus.SetHex("d01f952e1090a5a72a3eda261083256596ccc1929...................................... .............

and am wondering what it is, how it works.

The full piece :-

Code:
CBigNum bnTrustedModulus;

    if (fTestNet)
    {
        pchMessageStart[0] = 0xcd;
        pchMessageStart[1] = 0xf2;
        pchMessageStart[2] = 0xc0;
        pchMessageStart[3] = 0xef;

        bnTrustedModulus.SetHex("f0d14cf72623dacfe738d0892b599be0f31052239cddd95a3f25101c801dc990453b38c9434efe3f372db39a32c2bb44cbaea72d62c8931fa785b0ec44531308df3e46069be5573e49bb29f4d479bfc3d162f57a5965db03810be7636da265bfced9c01a6b0296c77910ebdc8016f70174f0f18a57b3b971ac43a934c6aedbc5c866764a3622b5b7e3f9832b8b3f133c849dbcc0396588abcd1e41048555746e4823fb8aba5b3d23692c6857fccce733d6bb6ec1d5ea0afafecea14a0f6f798b6b27f77dc989c557795cc39a0940ef6bb29a7fc84135193a55bcfc2f01dd73efad1b69f45a55198bd0e6bef4d338e452f6a420f1ae2b1167b923f76633ab6e55");
        bnProofOfWorkLimit = bnProofOfWorkLimitTestNet; // 16 bits PoW target limit for testnet
        nStakeMinAge = 1 * 60 * 60; // test net min age is 1 hour
        nCoinbaseMaturity = 10; // test maturity is 10 blocks
    }
    else
    {
        bnTrustedModulus.SetHex("d01f952e1090a5a72a3eda261083256596ccc192935ae1454c2bafd03b09e6ed11811be9f3a69f5783bbbced8c6a0c56621f42c2d19087416facf2f13cc7ed7159d1c5253119612b8449f0c7f54248e382d30ecab1928dbf075c5425dcaee1a819aa13550e0f3227b8c685b14e0eae094d65d8a610a6f49fff8145259d1187e4c6a472fa5868b2b67f957cb74b787f4311dbc13c97a2ca13acdb876ff506ebecbb904548c267d68868e07a32cd9ed461fbc2f920e9940e7788fed2e4817f274df5839c2196c80abe5c486df39795186d7bc86314ae1e8342f3c884b158b4b05b4302754bf351477d35370bad6639b2195d30006b77bf3dbb28b848fd9ecff5662bf39dde0c974e83af51b0d3d642d43834827b8c3b189065514636b8f2a59c42ba9b4fc4975d4827a5d89617a3873e4b377b4d559ad165748632bd928439cfbc5a8ef49bc2220e0b15fb0aa302367d5e99e379a961c1bc8cf89825da5525e3c8f14d7d8acca2fa9c133a2176ae69874d8b1d38b26b9c694e211018005a97b40848681b9dd38feb2de141626fb82591aad20dc629b2b6421cef1227809551a0e4e943ab99841939877f18f2d9c0addc93cf672e26b02ed94da3e6d329e8ac8f3736eebbf37bb1a21e5aadf04ee8e3b542f876aa88b2adf2608bd86329b7f7a56fd0dc1c40b48188731d11082aea360c62a0840c2db3dad7178fd7e359317ae081");
    }

is it similar to "magic" bytes or is it a completely different concept.
Jump to: