core/src/main/java/org/bouncycastle/pqc/crypto/qtesla/QTESLA.java
/**********************************************************************************************************************************
     * Description:	Decode Signature for Provably-Secure qTESLA Security Category-3
     **********************************************************************************************************************************/
Decode Signature for Provably-Secure qTESLA Security Category-3
Decode Signature for Provably - Secure qTESLA Security Category - 3
private static void decodeSignature(byte[] C, long[] Z, final byte[] signature, int signatureOffset)
    {
        int j = 0;
        for (int i = 0; i < Parameter.N_III_P; i += Byte.SIZE / 2)
        {
            Z[i + 0] = (CommonFunction.load32(signature, signatureOffset + Integer.SIZE / Byte.SIZE * (j + 0)) << 8) >> 8;
            Z[i + 1] = ((CommonFunction.load32(signature, signatureOffset + Integer.SIZE / Byte.SIZE * (j + 0)) >>> 24) & ((1 << 8) - 1)) |
                ((CommonFunction.load32(signature, signatureOffset + Integer.SIZE / Byte.SIZE * (j + 1)) << 16) >> 8);
            Z[i + 2] = ((CommonFunction.load32(signature, signatureOffset + Integer.SIZE / Byte.SIZE * (j + 1)) >>> 16) & ((1 << 16) - 1)) |
                ((CommonFunction.load32(signature, signatureOffset + Integer.SIZE / Byte.SIZE * (j + 2)) << 24) >> 8);
            Z[i + 3] = CommonFunction.load32(signature, signatureOffset + Integer.SIZE / Byte.SIZE * (j + 2)) >> 8;
            j += Byte.SIZE / 2 - 1;
        }
        System.arraycopy(signature, signatureOffset + Parameter.N_III_P * Parameter.D_III_P / Byte.SIZE, C, 0, Polynomial.HASH);
    }
private static void decodeSignature ( byte [ ] C , long [ ] Z , final byte [ ] signature , int signatureOffset ) { int j = 0 ; for ( int i = 0 ; i < Parameter . N_III_P ; i += Byte . SIZE / 2 ) { Z [ i + 0 ] = ( CommonFunction . load32 ( signature , signatureOffset + Integer . SIZE / Byte . SIZE * ( j + 0 ) ) << 8 ) >> 8 ; Z [ i + 1 ] = ( ( CommonFunction . load32 ( signature , signatureOffset + Integer . SIZE / Byte . SIZE * ( j + 0 ) ) >>> 24 ) & ( ( 1 << 8 ) - 1 ) ) | ( ( CommonFunction . load32 ( signature , signatureOffset + Integer . SIZE / Byte . SIZE * ( j + 1 ) ) << 16 ) >> 8 ) ; Z [ i + 2 ] = ( ( CommonFunction . load32 ( signature , signatureOffset + Integer . SIZE / Byte . SIZE * ( j + 1 ) ) >>> 16 ) & ( ( 1 << 16 ) - 1 ) ) | ( ( CommonFunction . load32 ( signature , signatureOffset + Integer . SIZE / Byte . SIZE * ( j + 2 ) ) << 24 ) >> 8 ) ; Z [ i + 3 ] = CommonFunction . load32 ( signature , signatureOffset + Integer . SIZE / Byte . SIZE * ( j + 2 ) ) >> 8 ; j += Byte . SIZE / 2 - 1 ; } System . arraycopy ( signature , signatureOffset + Parameter . N_III_P * Parameter . D_III_P / Byte . SIZE , C , 0 , Polynomial . HASH ) ; }
Description:     Decode Signature for Provably-Secure qTESLA Security Category-3
Description : Decode Signature for Provably - Secure qTESLA Security Category - 3