core/src/main/java/org/bouncycastle/pqc/crypto/qtesla/Polynomial.java
/******************************************************************************************************************************************************************************************
     * Description:	Inverse Number Theoretic Transform for Provably-Secure qTESLA Security Category-3
     *
     * @param        destination            Destination of Inverse Transformation
     * @param        destinationOffset    Starting Point of the Destination
     * @param        source                Source of Inverse Transformation
     * @param        sourceOffset        Starting Point of the Source
     *
     * @return none
     ******************************************************************************************************************************************************************************************/
Inverse Number Theoretic Transform for Provably-Secure qTESLA Security Category-3
@param        destination            Destination of Inverse Transformation
@param        destinationOffset    Starting Point of the Destination
@param        source                Source of Inverse Transformation
@param        sourceOffset        Starting Point of the Source

@return none
Inverse Number Theoretic Transform for Provably - Secure qTESLA Security Category - 3 @param destination Destination of Inverse Transformation @param destinationOffset Starting Point of the Destination @param source Source of Inverse Transformation @param sourceOffset Starting Point of the Source @return none
private static void inverseNumberTheoreticTransformIIIP(long destination[], int destinationOffset, long source[], int sourceOffset)
    {
        int jTwiddle = 0;
        for (int numberOfProblem = 1; numberOfProblem < Parameter.N_III_P; numberOfProblem *= 2)
        {
            int j = 0;
            int jFirst;
            for (jFirst = 0; jFirst < Parameter.N_III_P; jFirst = j + numberOfProblem)
            {
                int omega = (int)source[sourceOffset + (jTwiddle++)];
                for (j = jFirst; j < jFirst + numberOfProblem; j++)
                {
                    int temporary = (int)destination[destinationOffset + j];
                    destination[destinationOffset + j] = barrettP(
                        destination[destinationOffset + j + numberOfProblem] + temporary,
                        Parameter.Q_III_P, Parameter.BARRETT_MULTIPLICATION_III_P, Parameter.BARRETT_DIVISION_III_P
                    );
                    destination[destinationOffset + j + numberOfProblem] = barrettP(
                        montgomery(
                            omega * (Parameter.Q_III_P * 2L + temporary - destination[destinationOffset + j + numberOfProblem]),
                            Parameter.Q_III_P, Parameter.Q_INVERSE_III_P
                        ),
                        Parameter.Q_III_P, Parameter.BARRETT_MULTIPLICATION_III_P, Parameter.BARRETT_DIVISION_III_P
                    );
                }
            }
        }
    }
private static void inverseNumberTheoreticTransformIIIP ( long destination [ ] , int destinationOffset , long source [ ] , int sourceOffset ) { int jTwiddle = 0 ; for ( int numberOfProblem = 1 ; numberOfProblem < Parameter . N_III_P ; numberOfProblem *= 2 ) { int j = 0 ; int jFirst ; for ( jFirst = 0 ; jFirst < Parameter . N_III_P ; jFirst = j + numberOfProblem ) { int omega = ( int ) source [ sourceOffset + ( jTwiddle ++ ) ] ; for ( j = jFirst ; j < jFirst + numberOfProblem ; j ++ ) { int temporary = ( int ) destination [ destinationOffset + j ] ; destination [ destinationOffset + j ] = barrettP ( destination [ destinationOffset + j + numberOfProblem ] + temporary , Parameter . Q_III_P , Parameter . BARRETT_MULTIPLICATION_III_P , Parameter . BARRETT_DIVISION_III_P ) ; destination [ destinationOffset + j + numberOfProblem ] = barrettP ( montgomery ( omega * ( Parameter . Q_III_P * 2L + temporary - destination [ destinationOffset + j + numberOfProblem ] ) , Parameter . Q_III_P , Parameter . Q_INVERSE_III_P ) , Parameter . Q_III_P , Parameter . BARRETT_MULTIPLICATION_III_P , Parameter . BARRETT_DIVISION_III_P ) ; } } } }
Description:     Inverse Number Theoretic Transform for Provably-Secure qTESLA Security Category-3
 @param        destination            Destination of Inverse Transformation
 @param        destinationOffset    Starting Point of the Destination
 @param        source                Source of Inverse Transformation
 @param        sourceOffset        Starting Point of the Source
Description : Inverse Number Theoretic Transform for Provably - Secure qTESLA Security Category - 3 @param destination Destination of Inverse Transformation @param destinationOffset Starting Point of the Destination @param source Source of Inverse Transformation @param sourceOffset Starting Point of the Source