func crypto/subtle.ConstantTimeCompare

30 uses

	crypto/subtle (current package)
		constant_time.go#L13: func ConstantTimeCompare(x, y []byte) int {

	crypto/aes
		aes_gcm.go#L178: 	if subtle.ConstantTimeCompare(expectedTag[:g.tagSize], tag) != 1 {

	crypto/cipher
		gcm.go#L232: 	if subtle.ConstantTimeCompare(expectedTag[:g.tagSize], tag) != 1 {

	crypto/ecdh
		ecdh.go#L95: 		subtle.ConstantTimeCompare(k.publicKey, xx.publicKey) == 1
		ecdh.go#L154: 		subtle.ConstantTimeCompare(k.privateKey, xx.privateKey) == 1

	crypto/ecdsa
		ecdsa.go#L143: 	return subtle.ConstantTimeCompare(a.Bytes(), b.Bytes()) == 1

	crypto/ed25519
		ed25519.go#L53: 	return subtle.ConstantTimeCompare(pub, xx) == 1
		ed25519.go#L72: 	return subtle.ConstantTimeCompare(priv, xx) == 1

	crypto/hmac
		hmac.go#L179: 	return subtle.ConstantTimeCompare(mac1, mac2) == 1

	crypto/internal/edwards25519/field
		fe.go#L254: 	return subtle.ConstantTimeCompare(sa, sv)

	crypto/internal/mlkem768
		mlkem768.go#L395: 	subtle.ConstantTimeCopy(subtle.ConstantTimeCompare(c[:], c1), Kout, Kprime)

	crypto/internal/nistec/fiat
		p224.go#L37: 	return subtle.ConstantTimeCompare(eBytes, tBytes)
		p224.go#L44: 	return subtle.ConstantTimeCompare(eBytes, zero)
		p256.go#L37: 	return subtle.ConstantTimeCompare(eBytes, tBytes)
		p256.go#L44: 	return subtle.ConstantTimeCompare(eBytes, zero)
		p384.go#L37: 	return subtle.ConstantTimeCompare(eBytes, tBytes)
		p384.go#L44: 	return subtle.ConstantTimeCompare(eBytes, zero)
		p521.go#L37: 	return subtle.ConstantTimeCompare(eBytes, tBytes)
		p521.go#L44: 	return subtle.ConstantTimeCompare(eBytes, zero)

	crypto/rsa
		rsa.go#L152: 	return subtle.ConstantTimeCompare(a.Bytes(), b.Bytes()) == 1
		rsa.go#L756: 	lHash2Good := subtle.ConstantTimeCompare(lHash, lHash2)

	crypto/tls
		conn.go#L454: 		macAndPaddingGood := subtle.ConstantTimeCompare(localMAC, remoteMAC) & int(paddingGood)
		handshake_client.go#L977: 		subtle.ConstantTimeCompare(verify, serverFinished.verifyData) != 1 {
		handshake_client_tls13.go#L102: 		if subtle.ConstantTimeCompare(acceptConfirmation, hs.serverHello.random[len(hs.serverHello.random)-8:]) == 1 {
		handshake_client_tls13.go#L279: 			if subtle.ConstantTimeCompare(acceptConfirmation, hs.serverHello.encryptedClientHello) == 1 {
		handshake_server.go#L802: 		subtle.ConstantTimeCompare(verify, clientFinished.verifyData) != 1 {
		ticket.go#L380: 		if subtle.ConstantTimeCompare(macBytes, expected) != 1 {

	github.com/golang-jwt/jwt/v5
		validator.go#L244: 		if subtle.ConstantTimeCompare([]byte(a), []byte(cmp)) != 0 {

	vendor/golang.org/x/crypto/internal/poly1305
		poly1305.go#L38: 	return subtle.ConstantTimeCompare(tmp[:], mac[:]) == 1
		poly1305.go#L98: 	return subtle.ConstantTimeCompare(expected, mac[:]) == 1