Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 394 for sig2 (0.11 sec)

  1. src/crypto/ed25519/ed25519_test.go

    		var priv [PrivateKeySize]byte
    		copy(priv[:], privBytes)
    		copy(priv[32:], pubKey)
    
    		sig2 := Sign(priv[:], msg)
    		if !bytes.Equal(sig, sig2[:]) {
    			t.Errorf("different signature result on line %d: %x vs %x", lineNo, sig, sig2)
    		}
    
    		if !Verify(pubKey, msg, sig2) {
    			t.Errorf("signature failed to verify on line %d", lineNo)
    		}
    
    		priv2 := NewKeyFromSeed(priv[:32])
    		if !bytes.Equal(priv[:], priv2) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 27 18:23:49 UTC 2024
    - 10.9K bytes
    - Viewed (0)
  2. cmd/signature-v2.go

    // according to the AWS S3 signature V2 spec.
    func compareSignatureV2(sig1, sig2 string) bool {
    	// Decode signature string to binary byte-sequence representation is required
    	// as Base64 encoding of a value is not unique:
    	// For example "aGVsbG8=" and "aGVsbG8=\r" will result in the same byte slice.
    	signature1, err := base64.StdEncoding.DecodeString(sig1)
    	if err != nil {
    		return false
    	}
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Jan 18 07:03:17 UTC 2024
    - 12.2K bytes
    - Viewed (0)
  3. cmd/signature-v4.go

    // according to the AWS S3 signature V4 spec.
    func compareSignatureV4(sig1, sig2 string) bool {
    	// The CTC using []byte(str) works because the hex encoding
    	// is unique for a sequence of bytes. See also compareSignatureV2.
    	return subtle.ConstantTimeCompare([]byte(sig1), []byte(sig2)) == 1
    }
    
    // doesPolicySignatureMatch - Verify query headers with post policy
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu May 16 23:13:47 UTC 2024
    - 12.4K bytes
    - Viewed (0)
  4. src/crypto/ed25519/ed25519.go

    	copy(privateKey[32:], publicKey)
    }
    
    // Sign signs the message with privateKey and returns a signature. It will
    // panic if len(privateKey) is not [PrivateKeySize].
    func Sign(privateKey PrivateKey, message []byte) []byte {
    	// Outline the function body so that the returned signature can be
    	// stack-allocated.
    	signature := make([]byte, SignatureSize)
    	sign(signature, privateKey, message, domPrefixPure, "")
    	return signature
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:11:18 UTC 2024
    - 11.7K bytes
    - Viewed (0)
  5. src/crypto/ecdsa/ecdsa_test.go

    	priv, _ := GenerateKey(c, rand.Reader)
    
    	hashed := []byte("testing")
    	sig, err := SignASN1(rand.Reader, priv, hashed)
    	if err != nil {
    		t.Errorf("error signing: %s", err)
    		return
    	}
    
    	if !VerifyASN1(&priv.PublicKey, hashed, sig) {
    		t.Errorf("VerifyASN1 failed")
    	}
    
    	hashed[0] ^= 0xff
    	if VerifyASN1(&priv.PublicKey, hashed, sig) {
    		t.Errorf("VerifyASN1 always works!")
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 21:33:58 UTC 2024
    - 13.5K bytes
    - Viewed (0)
  6. src/crypto/tls/key_agreement.go

    		return errServerKeyExchange
    	}
    
    	sigLen := int(sig[0])<<8 | int(sig[1])
    	if sigLen+2 != len(sig) {
    		return errServerKeyExchange
    	}
    	sig = sig[2:]
    
    	signed := hashForServerKeyExchange(sigType, sigHash, ka.version, clientHello.random, serverHello.random, serverECDHEParams)
    	if err := verifyHandshakeSignature(sigType, cert.PublicKey, sigHash, signed, sig); err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 14:56:25 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  7. platforms/software/signing/src/main/java/org/gradle/plugins/signing/Signature.java

         *
         * <p>Defaults to the extension of the {@link #getToSign() file to sign} plus the extension of the {@link #getSignatureType() signature type}.
         * For example, when signing the file ‘my.zip’ with a signature type with extension ‘sig’, the default type is ‘zip.sig’.</p>
         *
         * @return The type. May be {@code null} if the file to sign or signature type are unknown at this time.
         *
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 11 12:20:43 UTC 2024
    - 16.2K bytes
    - Viewed (0)
  8. src/crypto/ecdsa/ecdsa.go

    	case elliptic.P521().Params():
    		return verifyNISTEC(p521(), pub, hash, sig)
    	default:
    		return verifyLegacy(pub, hash, sig)
    	}
    }
    
    func verifyNISTEC[Point nistPoint[Point]](c *nistCurve[Point], pub *PublicKey, hash, sig []byte) bool {
    	rBytes, sBytes, err := parseSignature(sig)
    	if err != nil {
    		return false
    	}
    
    	Q, err := c.pointFromAffine(pub.X, pub.Y)
    	if err != nil {
    		return false
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:11:18 UTC 2024
    - 20.4K bytes
    - Viewed (0)
  9. cmd/streaming-signature-v4.go

    		valueBuffer.Write([]byte{'\n'})
    	}
    	sig = sig[len("x-amz-trailer-signature:"):]
    	sig = bytes.TrimSpace(sig)
    	cr.chunkSHA256Writer.Write(valueBuffer.Bytes())
    	wantSig := cr.getTrailerChunkSignature()
    	if !compareSignatureV4(string(sig), wantSig) {
    		if cr.debug {
    			fmt.Printf("signature, want: %q, got %q\nSignature buffer: %q\n", wantSig, string(sig), valueBuffer.String())
    		}
    		return errSignatureMismatch
    	}
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu May 16 23:13:47 UTC 2024
    - 18.2K bytes
    - Viewed (0)
  10. go.mod

    	k8s.io/gengo/v2 v2.0.0-20240228010128-51d4e06bde70 // indirect
    	sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.30.3 // indirect
    	sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
    	sigs.k8s.io/kustomize/api v0.17.2 // indirect
    	sigs.k8s.io/kustomize/kustomize/v5 v5.4.2 // indirect
    	sigs.k8s.io/kustomize/kyaml v0.17.1 // indirect
    )
    
    replace (
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 12 21:47:11 UTC 2024
    - 11.8K bytes
    - Viewed (0)
Back to top