core/src/main/java/org/bouncycastle/pqc/crypto/qtesla/Polynomial.java
/********************************************************************************************
     * Description:	Barrett Reduction for Heuristic qTESLA Security Category-1 and Category-3
     * 				(Option for Size or Speed)
     *
     * @param        number                    Number to be Reduced
     * @param        barrettMultiplication
     * @param        barrettDivision
     * @param        q                        Modulus
     *
     * @return Reduced Number
     ********************************************************************************************/
Barrett Reduction for Heuristic qTESLA Security Category-1 and Category-3
(Option for Size or Speed)



@return Reduced Number
Barrett Reduction for Heuristic qTESLA Security Category - 1 and Category - 3 ( Option for Size or Speed ) @return Reduced Number
public static int barrett(long number, int q, int barrettMultiplication, int barrettDivision)
    {
        long u =  ((number * barrettMultiplication) >> barrettDivision) * q;
        return (int)(number - u);
    }
public static int barrett ( long number , int q , int barrettMultiplication , int barrettDivision ) { long u = ( ( number * barrettMultiplication ) >> barrettDivision ) * q ; return ( int ) ( number - u ) ; }
Description:     Barrett Reduction for Heuristic qTESLA Security Category-1 and Category-3
                          (Option for Size or Speed)
Description : Barrett Reduction for Heuristic qTESLA Security Category - 1 and Category - 3 ( Option for Size or Speed )