Пример #1
0
 public IVector GetEncryptedVector(IEnumerable <BigInteger> v, EVectorFormat format)
 {
     return(new RawVector(v, BlockSize)
     {
         Format = format
     });
 }
Пример #2
0
 public IVector GetEncryptedVector(Vector <double> v, EVectorFormat format, double scale)
 {
     return(new RawVector(v, scale, BlockSize)
     {
         Format = format
     });
 }
Пример #3
0
 public IVector GetPlainVector(Vector <double> v, EVectorFormat format, double scale)
 {
     throw new NotImplementedException();
 }
Пример #4
0
 public IVector GetEncryptedVector(IEnumerable <BigInteger> v, EVectorFormat format)
 {
     throw new NotImplementedException();
 }
Пример #5
0
 public IVector GetEncryptedVector(IEnumerable <BigInteger> v, EVectorFormat format)
 {
     return(Utils.ProcessInEnv((env) =>
                               new EncryptedSealBfvVector(v, env, EncryptData: true, Format: format), this));
 }
Пример #6
0
 public IVector GetEncryptedVector(Vector <double> v, EVectorFormat format, double scale)
 {
     return(Utils.ProcessInEnv((env) =>
                               new EncryptedSealBfvVector(v, env, scale, EncryptData: true, Format: format), this));
 }
Пример #7
0
        public EncryptedSealBfvVector(IEnumerable <BigInteger> v, IComputationEnvironment env, bool EncryptData = true, EVectorFormat Format = EVectorFormat.dense)
        {
            this.Scale = Scale;
            var leenv  = env as EncryptedSealBfvEnvironment;
            var splits = SplitBigNumbers(v, leenv);

            eVectors = new AtomicSealBfvEncryptedVector[leenv.Environments.Length];
            Parallel.For(0, eVectors.Length, i =>
            {
                eVectors[i] = new AtomicSealBfvEncryptedVector(splits[i], leenv.Environments[i], Scale: 1, SignedNumbers: false, EncryptData: EncryptData, Format: Format);
            });
        }