func crypto/subtle.ConstantTimeCompare
25 uses
crypto/subtle (current package)
constant_time.go#L12: func ConstantTimeCompare(x, y []byte) int {
crypto/aes
aes_gcm.go#L185: if subtle.ConstantTimeCompare(expectedTag[:g.tagSize], tag) != 1 {
crypto/cipher
gcm.go#L231: if subtle.ConstantTimeCompare(expectedTag[:g.tagSize], tag) != 1 {
crypto/hmac
hmac.go#L171: return subtle.ConstantTimeCompare(mac1, mac2) == 1
crypto/rsa
pkcs1v15.go#L292: ok &= subtle.ConstantTimeCompare(em[k-hashLen:k], hashed)
pkcs1v15.go#L293: ok &= subtle.ConstantTimeCompare(em[k-tLen:k-hashLen], prefix)
rsa.go#L635: lHash2Good := subtle.ConstantTimeCompare(lHash, lHash2)
crypto/tls
conn.go#L436: macAndPaddingGood := subtle.ConstantTimeCompare(localMAC, remoteMAC) & int(paddingGood)
handshake_client.go#L765: subtle.ConstantTimeCompare(verify, serverFinished.verifyData) != 1 {
handshake_server.go#L696: subtle.ConstantTimeCompare(verify, clientFinished.verifyData) != 1 {
ticket.go#L173: if subtle.ConstantTimeCompare(macBytes, expected) != 1 {
golang.org/x/crypto/curve25519
curve25519.go#L48: if subtle.ConstantTimeCompare(Basepoint, []byte{
curve25519.go#L90: if subtle.ConstantTimeCompare(dst[:], zero[:]) == 1 {
golang.org/x/crypto/openpgp/packet
symmetrically_encrypted.go#L204: if subtle.ConstantTimeCompare(final, ser.trailer[2:]) != 1 {
golang.org/x/crypto/poly1305
poly1305.go#L38: return subtle.ConstantTimeCompare(tmp[:], mac[:]) == 1
poly1305.go#L98: return subtle.ConstantTimeCompare(expected, mac[:]) == 1
golang.org/x/crypto/ssh
cipher.go#L215: if subtle.ConstantTimeCompare(s.macResult, mac) != 1 {
cipher.go#L570: if subtle.ConstantTimeCompare(c.macResult, mac) != 1 {
kex.go#L465: if subtle.ConstantTimeCompare(secret[:], curve25519Zeros[:]) == 1 {
kex.go#L511: if subtle.ConstantTimeCompare(secret[:], curve25519Zeros[:]) == 1 {
golang.org/x/crypto/ssh/agent
keyring.go#L105: if 1 != subtle.ConstantTimeCompare(passphrase, r.passphrase) {
vendor/golang.org/x/crypto/curve25519
curve25519.go#L48: if subtle.ConstantTimeCompare(Basepoint, []byte{
curve25519.go#L90: if subtle.ConstantTimeCompare(dst[:], zero[:]) == 1 {
vendor/golang.org/x/crypto/poly1305
poly1305.go#L38: return subtle.ConstantTimeCompare(tmp[:], mac[:]) == 1
poly1305.go#L98: return subtle.ConstantTimeCompare(expected, mac[:]) == 1
 |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |