Package com.securityinnovation.jNeo

Examples of com.securityinnovation.jNeo.CiphertextBadLengthException


          throw new ObjectClosedException();
        if (f == null)
          throw new NoPrivateKeyException();
        int expectedCTLength = BitPack.pack(keyParams.N, keyParams.q);
        if (ciphertext.length != expectedCTLength)
          throw new CiphertextBadLengthException(
              ciphertext.length, expectedCTLength);

        boolean fail = false;

        // Unpack ciphertext into the polynomial e.
        FullPolynomial e = new FullPolynomial(keyParams.N);
        int numUnpacked = BitPack.unpack(
            keyParams.N, keyParams.q, ciphertext, 0, e.p, 0);
        if (numUnpacked != ciphertext.length)
          throw new CiphertextBadLengthException(
              ciphertext.length, BitPack.pack(keyParams.N, keyParams.q));

        // a = f*e with coefficients reduced to range [A..A+q-1], where
        // A = lower bound decryption coefficient (-q/2 in all param sets)
        FullPolynomial ci = FullPolynomial.convolution(f, e, keyParams.q);
View Full Code Here

TOP

Related Classes of com.securityinnovation.jNeo.CiphertextBadLengthException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.