- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for NewUnauthenticatedCipher (0.46 sec)
-
src/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305_generic.go
ciphertext, tag := out[:len(plaintext)], out[len(plaintext):] if alias.InexactOverlap(out, plaintext) { panic("chacha20poly1305: invalid buffer overlap") } var polyKey [32]byte s, _ := chacha20.NewUnauthenticatedCipher(c.key[:], nonce) s.XORKeyStream(polyKey[:], polyKey[:]) s.SetCounter(1) // set the counter to 1, skipping 32 bytes s.XORKeyStream(ciphertext, plaintext) p := poly1305.New(&polyKey)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Oct 26 00:11:50 UTC 2022 - 2.2K bytes - Viewed (0) -
src/vendor/golang.org/x/crypto/chacha20/chacha_generic.go
func NewUnauthenticatedCipher(key, nonce []byte) (*Cipher, error) { // This function is split into a wrapper so that the Cipher allocation will // be inlined, and depending on how the caller uses the return value, won't // escape to the heap. c := &Cipher{} return newUnauthenticatedCipher(c, key, nonce) } func newUnauthenticatedCipher(c *Cipher, key, nonce []byte) (*Cipher, error) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Oct 26 00:11:50 UTC 2022 - 13.9K bytes - Viewed (0) -
src/crypto/ecdh/ecdh_test.go
t.Run("X25519", func(t *testing.T) { f(t, ecdh.X25519()) }) } func BenchmarkECDH(b *testing.B) { benchmarkAllCurves(b, func(b *testing.B, curve ecdh.Curve) { c, err := chacha20.NewUnauthenticatedCipher(make([]byte, 32), make([]byte, 12)) if err != nil { b.Fatal(err) } rand := cipher.StreamReader{ S: c, R: zeroReader, } peerKey, err := curve.GenerateKey(rand)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Mar 27 18:23:49 UTC 2024 - 18K bytes - Viewed (0)