Example #1
0
        public ProofInfo Rewind_range_proof(Identifier keyId, Commitment commit, RangeProof proof)
        {
            var nonce     = Derived_key(keyId);
            var proofInfo = Secp.rewind_range_proof(commit, proof, nonce);

            return(proofInfo);
        }
Example #2
0
        public Signiture Sign(Message msg, Identifier keyId)
        {
            var skey = Derived_key(keyId);
            var sig  = Secp.Sign(msg, skey);

            return(sig);
        }
Example #3
0
        public Commitment Switch_commit(Identifier keyId)
        {
            var skey   = Derived_key(keyId);
            var commit = Secp.switch_commit(skey);

            return(commit);
        }
Example #4
0
        public Commitment commit_with_key_index(ulong amount, uint derivation)
        {
            var skey   = derived_key_from_index(derivation);
            var commit = Secp.Commit(amount, skey);

            return(commit);
        }
Example #5
0
        public Commitment Commit(ulong amount, Identifier keyId)
        {
            var skey   = Derived_key(keyId);
            var commit = Secp.Commit(amount, skey);

            return(commit);
        }
Example #6
0
        public RangeProof Range_proof(ulong amount, Identifier keyId, Commitment commit, ProofMessage msg)

        {
            var skey       = Derived_key(keyId);
            var rangeProof = Secp.range_proof(0, amount, skey, commit, msg);

            return(rangeProof);
        }
Example #7
0
        public BlindingFactor Blind_sum(BlindSum blindSum)
        {
            var posKeys = blindSum.PositiveKeyIds.Select(Derived_key).ToList();
            var negKeys = blindSum.NegativeKeyIds.Select(Derived_key).ToList();

            posKeys.AddRange(blindSum.PositiveBlindingFactors.Select(pbf => pbf.Key));
            negKeys.AddRange(blindSum.NegativeBlindingFactors.Select(nbf => nbf.Key));

            var blinding = Secp.blind_sum(posKeys.ToArray(), negKeys.ToArray());

            return(BlindingFactor.New(blinding));
        }
Example #8
0
        public Signiture Sign_with_blinding(Message msg, BlindingFactor blinding)
        {
            var sig = Secp.Sign(msg, blinding.Key);

            return(sig);
        }