public Puzzle Unblind(BlindFactor blind) { if (blind == null) { throw new ArgumentNullException(nameof(blind)); } return(new Puzzle(this._RsaPubKey, new PuzzleValue(this.RsaPubKey.RevertBlind(this.PuzzleValue._Value, blind)))); }
internal BigInteger Blind(BigInteger data, ref BlindFactor blindFactor) { if (data == null) { throw new ArgumentNullException(nameof(data)); } EnsureInitializeBlindFactor(ref blindFactor); return(Blind(blindFactor._Value.ModPow(this._Key.Exponent, this._Key.Modulus), data)); }
public PuzzleSolution Unblind(RsaPubKey rsaPubKey, BlindFactor blind) { if (rsaPubKey == null) { throw new ArgumentNullException(nameof(rsaPubKey)); } if (blind == null) { throw new ArgumentNullException(nameof(blind)); } return(new PuzzleSolution(rsaPubKey.Unblind(this._Value, blind))); }
internal BigInteger Unblind(BigInteger data, BlindFactor blindFactor) { if (data == null) { throw new ArgumentNullException(nameof(data)); } if (blindFactor == null) { throw new ArgumentNullException(nameof(blindFactor)); } EnsureInitializeBlindFactor(ref blindFactor); return(Blind(blindFactor._Value.ModInverse(this._Key.Modulus), data)); }
private void EnsureInitializeBlindFactor(ref BlindFactor blindFactor) { blindFactor = blindFactor ?? new BlindFactor(Utils.GenerateEncryptableInteger(this._Key)); }
public Puzzle Blind(ref BlindFactor blind) { return(new Puzzle(this._RsaPubKey, new PuzzleValue(this._RsaPubKey.Blind(this.PuzzleValue._Value, ref blind)))); }