示例#1
0
            // canUseKDSA checks if KDSA instruction is available, and if it is, it checks
            // the name of the curve to see if it matches the curves supported(P-256, P-384, P-521).
            // Then, based on the curve name, a function code and a block size will be assigned.
            // If KDSA instruction is not available or if the curve is not supported, canUseKDSA
            // will set ok to false.
            private static (ulong, long, bool) canUseKDSA(elliptic.Curve c)
            {
                ulong functionCode = default;
                long  blockSize    = default;
                bool  ok           = default;

                if (!cpu.S390X.HasECDSA)
                {
示例#2
0
 private static (ptr <big.Int>, ptr <big.Int>, error) sign(ptr <PrivateKey> _addr_priv, ptr <cipher.StreamReader> _addr_csprng, elliptic.Curve c, slice <byte> hash)
 {
     ptr <big.Int>           r      = default !;
示例#3
0
 public PublicKey(elliptic.Curve Curve = default, ref ptr <big.Int> X = default, ref ptr <big.Int> Y = default)
 {
     this.Curve = Curve;
     this.X     = X;
     this.Y     = Y;
 }