当前位置: 首页>>代码示例>>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;未经允许,请勿转载。