當前位置: 首頁>>代碼示例>>Java>>正文


Java Nat224.gte方法代碼示例

本文整理匯總了Java中org.bouncycastle.math.raw.Nat224.gte方法的典型用法代碼示例。如果您正苦於以下問題:Java Nat224.gte方法的具體用法?Java Nat224.gte怎麽用?Java Nat224.gte使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.bouncycastle.math.raw.Nat224的用法示例。


在下文中一共展示了Nat224.gte方法的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: add

import org.bouncycastle.math.raw.Nat224; //導入方法依賴的package包/類
public static void add(int[] x, int[] y, int[] z)
{
    int c = Nat224.add(x, y, z);
    if (c != 0 || (z[6] == P6 && Nat224.gte(z, P)))
    {
        addPInvTo(z);
    }
}
 
開發者ID:ttt43ttt,項目名稱:gwt-crypto,代碼行數:9,代碼來源:SecP224R1Field.java

示例2: addOne

import org.bouncycastle.math.raw.Nat224; //導入方法依賴的package包/類
public static void addOne(int[] x, int[] z)
{
    int c = Nat.inc(7, x, z);
    if (c != 0 || (z[6] == P6 && Nat224.gte(z, P)))
    {
        addPInvTo(z);
    }
}
 
開發者ID:ttt43ttt,項目名稱:gwt-crypto,代碼行數:9,代碼來源:SecP224R1Field.java

示例3: fromBigInteger

import org.bouncycastle.math.raw.Nat224; //導入方法依賴的package包/類
public static int[] fromBigInteger(BigInteger x)
{
    int[] z = Nat224.fromBigInteger(x);
    if (z[6] == P6 && Nat224.gte(z, P))
    {
        Nat224.subFrom(P, z);
    }
    return z;
}
 
開發者ID:ttt43ttt,項目名稱:gwt-crypto,代碼行數:10,代碼來源:SecP224R1Field.java

示例4: reduce32

import org.bouncycastle.math.raw.Nat224; //導入方法依賴的package包/類
public static void reduce32(int x, int[] z)
    {
        long cc = 0;

        if (x != 0)
        {
            long xx07 = x & M;

            cc += (z[0] & M) - xx07;
            z[0] = (int)cc;
            cc >>= 32;
            if (cc != 0)
            {
                cc += (z[1] & M);
                z[1] = (int)cc;
                cc >>= 32;
                cc += (z[2] & M);
                z[2] = (int)cc;
                cc >>= 32;
            }
            cc += (z[3] & M) + xx07;
            z[3] = (int)cc;
            cc >>= 32;

//            assert cc == 0 || cc == 1;
        }

        if ((cc != 0 && Nat.incAt(7, z, 4) != 0)
            || (z[6] == P6 && Nat224.gte(z, P)))
        {
            addPInvTo(z);
        }
    }
 
開發者ID:ttt43ttt,項目名稱:gwt-crypto,代碼行數:34,代碼來源:SecP224R1Field.java

示例5: twice

import org.bouncycastle.math.raw.Nat224; //導入方法依賴的package包/類
public static void twice(int[] x, int[] z)
{
    int c = Nat.shiftUpBit(7, x, 0, z);
    if (c != 0 || (z[6] == P6 && Nat224.gte(z, P)))
    {
        addPInvTo(z);
    }
}
 
開發者ID:ttt43ttt,項目名稱:gwt-crypto,代碼行數:9,代碼來源:SecP224R1Field.java

示例6: add

import org.bouncycastle.math.raw.Nat224; //導入方法依賴的package包/類
public static void add(int[] x, int[] y, int[] z)
{
    int c = Nat224.add(x, y, z);
    if (c != 0 || (z[6] == P6 && Nat224.gte(z, P)))
    {
        Nat.add33To(7, PInv33, z);
    }
}
 
開發者ID:ttt43ttt,項目名稱:gwt-crypto,代碼行數:9,代碼來源:SecP224K1Field.java

示例7: addOne

import org.bouncycastle.math.raw.Nat224; //導入方法依賴的package包/類
public static void addOne(int[] x, int[] z)
{
    int c = Nat.inc(7, x, z);
    if (c != 0 || (z[6] == P6 && Nat224.gte(z, P)))
    {
        Nat.add33To(7, PInv33, z);
    }
}
 
開發者ID:ttt43ttt,項目名稱:gwt-crypto,代碼行數:9,代碼來源:SecP224K1Field.java

示例8: reduce

import org.bouncycastle.math.raw.Nat224; //導入方法依賴的package包/類
public static void reduce(int[] xx, int[] z)
{
    long cc = Nat224.mul33Add(PInv33, xx, 7, xx, 0, z, 0);
    int c = Nat224.mul33DWordAdd(PInv33, cc, z, 0);

    // assert c == 0L || c == 1L;

    if (c != 0 || (z[6] == P6 && Nat224.gte(z, P)))
    {
        Nat.add33To(7, PInv33, z);
    }
}
 
開發者ID:thedrummeraki,項目名稱:Aki-SSL,代碼行數:13,代碼來源:SecP224K1Field.java

示例9: reduce32

import org.bouncycastle.math.raw.Nat224; //導入方法依賴的package包/類
public static void reduce32(int x, int[] z)
{
    if ((x != 0 && Nat224.mul33WordAdd(PInv33, x, z, 0) != 0)
        || (z[6] == P6 && Nat224.gte(z, P)))
    {
        Nat.add33To(7, PInv33, z);
    }
}
 
開發者ID:ttt43ttt,項目名稱:gwt-crypto,代碼行數:9,代碼來源:SecP224K1Field.java

示例10: twice

import org.bouncycastle.math.raw.Nat224; //導入方法依賴的package包/類
public static void twice(int[] x, int[] z)
{
    int c = Nat.shiftUpBit(7, x, 0, z);
    if (c != 0 || (z[6] == P6 && Nat224.gte(z, P)))
    {
        Nat.add33To(7, PInv33, z);
    }
}
 
開發者ID:ttt43ttt,項目名稱:gwt-crypto,代碼行數:9,代碼來源:SecP224K1Field.java

示例11: fromBigInteger

import org.bouncycastle.math.raw.Nat224; //導入方法依賴的package包/類
public static int[] fromBigInteger(BigInteger x)
{
    int[] z = Nat224.fromBigInteger(x);
    if (z[6] == P6 && Nat224.gte(z, P))
    {
        Nat.add33To(7, PInv33, z);
    }
    return z;
}
 
開發者ID:thedrummeraki,項目名稱:Aki-SSL,代碼行數:10,代碼來源:SecP224K1Field.java

示例12: reduce

import org.bouncycastle.math.raw.Nat224; //導入方法依賴的package包/類
public static void reduce(int[] xx, int[] z)
    {
        long xx10 = xx[10] & M, xx11 = xx[11] & M, xx12 = xx[12] & M, xx13 = xx[13] & M;

        final long n = 1;

        long t0 = (xx[7] & M) + xx11 - n;
        long t1 = (xx[8] & M) + xx12;
        long t2 = (xx[9] & M) + xx13;

        long cc = 0;
        cc += (xx[0] & M) - t0;
        long z0 = cc & M;
        cc >>= 32;
        cc += (xx[1] & M) - t1;
        z[1] = (int)cc;
        cc >>= 32;
        cc += (xx[2] & M) - t2;
        z[2] = (int)cc;
        cc >>= 32;
        cc += (xx[3] & M) + t0 - xx10;
        long z3 = cc & M;
        cc >>= 32;
        cc += (xx[4] & M) + t1 - xx11;
        z[4] = (int)cc;
        cc >>= 32;
        cc += (xx[5] & M) + t2 - xx12;
        z[5] = (int)cc;
        cc >>= 32;
        cc += (xx[6] & M) + xx10 - xx13;
        z[6] = (int)cc;
        cc >>= 32;
        cc += n;

//        assert cc >= 0;

        z3 += cc;

        z0 -= cc;
        z[0] = (int)z0;
        cc = z0 >> 32;
        if (cc != 0)
        {
            cc += (z[1] & M);
            z[1] = (int)cc;
            cc >>= 32;
            cc += (z[2] & M);
            z[2] = (int)cc;
            z3 += cc >> 32;
        }
        z[3] = (int)z3;
        cc = z3 >> 32;

//        assert cc == 0 || cc == 1;

        if ((cc != 0 && Nat.incAt(7, z, 4) != 0)
            || (z[6] == P6 && Nat224.gte(z, P)))
        {
            addPInvTo(z);
        }
    }
 
開發者ID:ttt43ttt,項目名稱:gwt-crypto,代碼行數:62,代碼來源:SecP224R1Field.java


注:本文中的org.bouncycastle.math.raw.Nat224.gte方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。