Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 147 for curRev (0.11 sec)

  1. staging/src/k8s.io/apiserver/pkg/storage/etcd3/compact.go

    		return t, rev, err
    	}
    
    	curRev := resp.Header.Revision
    
    	if !resp.Succeeded {
    		curTime := resp.Responses[0].GetResponseRange().Kvs[0].Version
    		return curTime, curRev, nil
    	}
    	curTime := t + 1
    
    	if rev == 0 {
    		// We don't compact on bootstrap.
    		return curTime, curRev, nil
    	}
    	if _, err = client.Compact(ctx, rev); err != nil {
    		return curTime, curRev, err
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Aug 17 02:54:36 UTC 2022
    - 5.6K bytes
    - Viewed (0)
  2. src/crypto/ecdh/ecdh.go

    //
    // This check is performed in constant time as long as the key types and their
    // curve match.
    func (k *PublicKey) Equal(x crypto.PublicKey) bool {
    	xx, ok := x.(*PublicKey)
    	if !ok {
    		return false
    	}
    	return k.curve == xx.curve &&
    		subtle.ConstantTimeCompare(k.publicKey, xx.publicKey) == 1
    }
    
    func (k *PublicKey) Curve() Curve {
    	return k.curve
    }
    
    // PrivateKey is an ECDH private key, usually kept secret.
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 17:09:47 UTC 2023
    - 6.4K bytes
    - Viewed (0)
  3. src/crypto/ecdsa/ecdsa_s390x_test.go

    	defer func() { testingDisableKDSA = false }()
    
    	curves := [...]elliptic.Curve{
    		elliptic.P256(),
    		elliptic.P384(),
    		elliptic.P521(),
    	}
    
    	for _, curve := range curves {
    		name := curve.Params().Name
    		t.Run(name, func(t *testing.T) { testKeyGeneration(t, curve) })
    		t.Run(name, func(t *testing.T) { testSignAndVerify(t, curve) })
    		t.Run(name, func(t *testing.T) { testNonceSafety(t, curve) })
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:29:44 UTC 2024
    - 834 bytes
    - Viewed (0)
  4. src/crypto/ecdh/ecdh_test.go

    	}
    }
    
    func TestMismatchedCurves(t *testing.T) {
    	curves := []struct {
    		name  string
    		curve ecdh.Curve
    	}{
    		{"P256", ecdh.P256()},
    		{"P384", ecdh.P384()},
    		{"P521", ecdh.P521()},
    		{"X25519", ecdh.X25519()},
    	}
    
    	for _, privCurve := range curves {
    		priv, err := privCurve.curve.GenerateKey(rand.Reader)
    		if err != nil {
    			t.Fatalf("failed to generate test key: %s", err)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 27 18:23:49 UTC 2024
    - 18K bytes
    - Viewed (0)
  5. src/crypto/elliptic/elliptic.go

    // curve (or is the conventional point at infinity), the behavior is undefined.
    func MarshalCompressed(curve Curve, x, y *big.Int) []byte {
    	panicIfNotOnCurve(curve, x, y)
    	byteLen := (curve.Params().BitSize + 7) / 8
    	compressed := make([]byte, 1+byteLen)
    	compressed[0] = byte(y.Bit(0)) | 2
    	x.FillBytes(compressed[1:])
    	return compressed
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 17:09:47 UTC 2023
    - 9K bytes
    - Viewed (0)
  6. src/crypto/ecdsa/equal_test.go

    	// aren't considered Equal.
    	differentCurve := &ecdsa.PublicKey{}
    	*differentCurve = *public // make a copy of the public key
    	if differentCurve.Curve == elliptic.P256() {
    		differentCurve.Curve = elliptic.P224()
    	} else {
    		differentCurve.Curve = elliptic.P256()
    	}
    	if public.Equal(differentCurve) {
    		t.Errorf("public keys with different curves are Equal")
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 05 18:05:10 UTC 2020
    - 2.1K bytes
    - Viewed (0)
  7. src/crypto/ecdsa/ecdsa_s390x.go

    // 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.
    func canUseKDSA(c elliptic.Curve) (functionCode uint64, blockSize int, ok bool) {
    	if testingDisableKDSA {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:29:44 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  8. internal/fips/api.go

    // TLSCurveIDs returns a list of supported elliptic curve IDs
    // in preference order.
    func TLSCurveIDs() []tls.CurveID {
    	var curves []tls.CurveID
    	if !Enabled {
    		curves = append(curves, tls.X25519) // Only enable X25519 in non-FIPS mode
    	}
    	curves = append(curves, tls.CurveP256)
    	if go19 {
    		// With go1.19 enable P384, P521 newer constant time implementations.
    		curves = append(curves, tls.CurveP384, tls.CurveP521)
    	}
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri Dec 30 19:37:07 UTC 2022
    - 5.1K bytes
    - Viewed (0)
  9. src/crypto/elliptic/elliptic_test.go

    		tests = tests[:1]
    	}
    	for _, test := range tests {
    		curve := test.curve
    		t.Run(test.name, func(t *testing.T) {
    			t.Parallel()
    			f(t, curve)
    		})
    	}
    }
    
    func TestOnCurve(t *testing.T) {
    	t.Parallel()
    	testAllCurves(t, func(t *testing.T, curve Curve) {
    		if !curve.IsOnCurve(curve.Params().Gx, curve.Params().Gy) {
    			t.Error("basepoint is not on the curve")
    		}
    	})
    }
    
    func TestOffCurve(t *testing.T) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 27 02:00:03 UTC 2023
    - 11.6K bytes
    - Viewed (0)
  10. src/crypto/x509/sec1.go

    	}
    
    	var curve elliptic.Curve
    	if namedCurveOID != nil {
    		curve = namedCurveFromOID(*namedCurveOID)
    	} else {
    		curve = namedCurveFromOID(privKey.NamedCurveOID)
    	}
    	if curve == nil {
    		return nil, errors.New("x509: unknown elliptic curve")
    	}
    
    	k := new(big.Int).SetBytes(privKey.PrivateKey)
    	curveOrder := curve.Params().N
    	if k.Cmp(curveOrder) >= 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 17:09:47 UTC 2023
    - 4.6K bytes
    - Viewed (0)
Back to top