- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for ConstantTimeCopy (0.25 sec)
-
src/crypto/subtle/constant_time.go
func ConstantTimeEq(x, y int32) int { return int((uint64(uint32(x^y)) - 1) >> 63) } // ConstantTimeCopy copies the contents of y into x (a slice of equal length) // if v == 1. If v == 0, x is left unchanged. Its behavior is undefined if v // takes any other value. func ConstantTimeCopy(v int, x, y []byte) { if len(x) != len(y) { panic("subtle: slices have different lengths") } xmask := byte(v - 1)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 05 01:54:27 UTC 2022 - 1.8K bytes - Viewed (0) -
src/crypto/subtle/constant_time_test.go
} if v == 1 { copy(x, y) } return x } func constantTimeCopyWrapper(v int, x, y []byte) []byte { if len(x) > len(y) { x = x[0:len(y)] } else { y = y[0:len(x)] } v &= 1 ConstantTimeCopy(v, x, y) return x } func TestConstantTimeCopy(t *testing.T) { err := quick.CheckEqual(constantTimeCopyWrapper, makeCopy, nil) if err != nil { t.Error(err) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Nov 10 03:47:57 UTC 2017 - 2.9K bytes - Viewed (0) -
src/crypto/rsa/pkcs1v15.go
// This should be impossible because decryptPKCS1v15 always // returns the full slice. return ErrDecryption } valid &= subtle.ConstantTimeEq(int32(len(em)-index), int32(len(key))) subtle.ConstantTimeCopy(valid, key, em[len(em)-len(key):]) return nil } // decryptPKCS1v15 decrypts ciphertext using priv. It returns one or zero in // valid that indicates whether the plaintext was correctly structured.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 00:11:21 UTC 2024 - 12.8K bytes - Viewed (0) -
src/crypto/internal/mlkem768/mlkem768.go
J := sha3.NewShake256() J.Write(z) J.Write(c[:]) Kout := make([]byte, SharedKeySize) J.Read(Kout) var cc [CiphertextSize]byte c1 := pkeEncrypt(&cc, &dk.encryptionKey, (*[32]byte)(m), r) subtle.ConstantTimeCopy(subtle.ConstantTimeCompare(c[:], c1), Kout, Kprime) return Kout } // parseDK parses a decryption key from its encoded form. // // It implements the computation of s from K-PKE.Decrypt according to FIPS 203
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 13 18:57:38 UTC 2024 - 28.4K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go
{"Sum384", Func, 2}, {"Sum512", Func, 2}, {"Sum512_224", Func, 5}, {"Sum512_256", Func, 5}, }, "crypto/subtle": { {"ConstantTimeByteEq", Func, 0}, {"ConstantTimeCompare", Func, 0}, {"ConstantTimeCopy", Func, 0}, {"ConstantTimeEq", Func, 0}, {"ConstantTimeLessOrEq", Func, 2}, {"ConstantTimeSelect", Func, 0}, {"XORBytes", Func, 20}, }, "crypto/tls": {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 534.2K bytes - Viewed (0) -
api/go1.txt
pkg crypto/sha512, func New384() hash.Hash pkg crypto/subtle, func ConstantTimeByteEq(uint8, uint8) int pkg crypto/subtle, func ConstantTimeCompare([]uint8, []uint8) int pkg crypto/subtle, func ConstantTimeCopy(int, []uint8, []uint8) pkg crypto/subtle, func ConstantTimeEq(int32, int32) int pkg crypto/subtle, func ConstantTimeSelect(int, int, int) int pkg crypto/tls, const NoClientCert ClientAuthType
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Aug 14 18:58:28 UTC 2013 - 1.7M bytes - Viewed (0)