core/src/main/java/org/bouncycastle/pqc/crypto/qtesla/QTESLA.java
/******************************************************************************************************************************************************
     * Description:	Decode Public Key for Heuristic qTESLA Security Category-3 (Option for Speed)
     *
     * @param        publicKey            Decoded Public Key
     * @param        seedA                Seed Used to Generate the Polynomials A_i for i = 1, ..., k
     * @param        seedAOffset            Starting Point of the Seed A
     * @param        publicKeyInput        Public Key to be Decoded
     *
     * @return none
     ******************************************************************************************************************************************************/
Decode Public Key for Heuristic qTESLA Security Category-3 (Option for Speed)
@param        publicKey            Decoded Public Key
@param        seedA                Seed Used to Generate the Polynomials A_i for i = 1, ..., k
@param        seedAOffset            Starting Point of the Seed A
@param        publicKeyInput        Public Key to be Decoded

@return none
Decode Public Key for Heuristic qTESLA Security Category - 3 ( Option for Speed ) @param publicKey Decoded Public Key @param seedA Seed Used to Generate the Polynomials A_i for i = 1 ... k @param seedAOffset Starting Point of the Seed A @param publicKeyInput Public Key to be Decoded @return none
private static void decodePublicKeyIIISpeed(int[] publicKey, byte[] seedA, int seedAOffset, final byte[] publicKeyInput)
    {
        int j = 0;
        int mask = (1 << Parameter.Q_LOGARITHM_III_SPEED) - 1;
        for (int i = 0; i < Parameter.N_III_SPEED; i += Integer.SIZE / Byte.SIZE)
        {
            publicKey[i + 0] = CommonFunction.load32(publicKeyInput, Integer.SIZE / Byte.SIZE * (j + 0)) & mask;
            publicKey[i + 1] = ((CommonFunction.load32(publicKeyInput, Integer.SIZE / Byte.SIZE * (j + 0)) >>> 24) |
                (CommonFunction.load32(publicKeyInput, Integer.SIZE / Byte.SIZE * (j + 1)) << 8)) & mask;
            publicKey[i + 2] = ((CommonFunction.load32(publicKeyInput, Integer.SIZE / Byte.SIZE * (j + 1)) >>> 16) |
                (CommonFunction.load32(publicKeyInput, Integer.SIZE / Byte.SIZE * (j + 2)) << 16)) & mask;
            publicKey[i + 3] = CommonFunction.load32(publicKeyInput, Integer.SIZE / Byte.SIZE * (j + 2)) >>> 8;
            j += Parameter.Q_LOGARITHM_III_SPEED / Byte.SIZE;
        }
        System.arraycopy(publicKeyInput, Parameter.N_III_SPEED * Parameter.Q_LOGARITHM_III_SPEED / Byte.SIZE, seedA, seedAOffset, Polynomial.SEED);
    }
private static void decodePublicKeyIIISpeed ( int [ ] publicKey , byte [ ] seedA , int seedAOffset , final byte [ ] publicKeyInput ) { int j = 0 ; int mask = ( 1 << Parameter . Q_LOGARITHM_III_SPEED ) - 1 ; for ( int i = 0 ; i < Parameter . N_III_SPEED ; i += Integer . SIZE / Byte . SIZE ) { publicKey [ i + 0 ] = CommonFunction . load32 ( publicKeyInput , Integer . SIZE / Byte . SIZE * ( j + 0 ) ) & mask ; publicKey [ i + 1 ] = ( ( CommonFunction . load32 ( publicKeyInput , Integer . SIZE / Byte . SIZE * ( j + 0 ) ) >>> 24 ) | ( CommonFunction . load32 ( publicKeyInput , Integer . SIZE / Byte . SIZE * ( j + 1 ) ) << 8 ) ) & mask ; publicKey [ i + 2 ] = ( ( CommonFunction . load32 ( publicKeyInput , Integer . SIZE / Byte . SIZE * ( j + 1 ) ) >>> 16 ) | ( CommonFunction . load32 ( publicKeyInput , Integer . SIZE / Byte . SIZE * ( j + 2 ) ) << 16 ) ) & mask ; publicKey [ i + 3 ] = CommonFunction . load32 ( publicKeyInput , Integer . SIZE / Byte . SIZE * ( j + 2 ) ) >>> 8 ; j += Parameter . Q_LOGARITHM_III_SPEED / Byte . SIZE ; } System . arraycopy ( publicKeyInput , Parameter . N_III_SPEED * Parameter . Q_LOGARITHM_III_SPEED / Byte . SIZE , seedA , seedAOffset , Polynomial . SEED ) ; }
Description:     Decode Public Key for Heuristic qTESLA Security Category-3 (Option for Speed)
 @param        publicKey            Decoded Public Key
 @param        seedA                Seed Used to Generate the Polynomials A_i for i = 1, ..., k
 @param        seedAOffset            Starting Point of the Seed A
 @param        publicKeyInput        Public Key to be Decoded
Description : Decode Public Key for Heuristic qTESLA Security Category - 3 ( Option for Speed ) @param publicKey Decoded Public Key @param seedA Seed Used to Generate the Polynomials A_i for i = 1 ... k @param seedAOffset Starting Point of the Seed A @param publicKeyInput Public Key to be Decoded