public SyntheticSecretNonceProvider(Strobe128 strobe, IEnumerable <Scalar> secrets, WasabiRandom random)
    {
        Guard.NotNullOrEmpty(nameof(secrets), secrets);
        _strobe      = strobe;
        _secretCount = secrets.Count();

        // add secret inputs as key material
        foreach (var secret in secrets)
        {
            _strobe.Key(secret.ToBytes(), false);
        }

        _strobe.Key(random.GetBytes(32), false);
    }
Example #2
0
        public SyntheticSecretNonceProvider(Strobe128 strobe, IEnumerable <Scalar> secrets, WasabiRandom random)
        {
            Guard.NotNullOrEmpty(nameof(secrets), secrets);

            _strobe = strobe;

            // add secret inputs as key material
            foreach (var secret in secrets)
            {
                _strobe.Key(secret.ToBytes(), false);
            }

            // add randomness as key material
            _strobe.Key(random.GetBytes(32), false);

            // Set up a generator of vectors of scalars the size as secrets vector
            Sequence = VectorGenerator(secrets.Count());
        }