Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 73 for cipherText (0.19 sec)

  1. src/crypto/aes/gcm_s390x.go

    		panic("crypto/cipher: incorrect GCM tag size")
    	}
    	if len(ciphertext) < g.tagSize {
    		return nil, errOpen
    	}
    	if uint64(len(ciphertext)) > ((1<<32)-2)*uint64(BlockSize)+uint64(g.tagSize) {
    		return nil, errOpen
    	}
    
    	tag := ciphertext[len(ciphertext)-g.tagSize:]
    	ciphertext = ciphertext[:len(ciphertext)-g.tagSize]
    
    	counter := g.deriveCounter(nonce)
    
    	var tagMask [gcmBlockSize]byte
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 18:57:38 UTC 2024
    - 11.3K bytes
    - Viewed (0)
  2. src/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305_amd64.go

    }
    
    func (c *chacha20poly1305) open(dst, nonce, ciphertext, additionalData []byte) ([]byte, error) {
    	if !cpu.X86.HasSSSE3 {
    		return c.openGeneric(dst, nonce, ciphertext, additionalData)
    	}
    
    	var state [16]uint32
    	setupState(&state, &c.key, nonce)
    
    	ciphertext = ciphertext[:len(ciphertext)-16]
    	ret, out := sliceForAppend(dst, len(ciphertext))
    	if alias.InexactOverlap(out, ciphertext) {
    		panic("chacha20poly1305: invalid buffer overlap")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:33 UTC 2023
    - 2.4K bytes
    - Viewed (0)
  3. src/crypto/cipher/ofb_test.go

    			ofb := cipher.NewOFB(c, tt.iv)
    			ciphertext := make([]byte, len(plaintext))
    			ofb.XORKeyStream(ciphertext, plaintext)
    			if !bytes.Equal(ciphertext, tt.out[:len(plaintext)]) {
    				t.Errorf("%s/%d: encrypting\ninput % x\nhave % x\nwant % x", test, len(plaintext), plaintext, ciphertext, tt.out)
    			}
    		}
    
    		for j := 0; j <= 5; j += 5 {
    			ciphertext := tt.out[0 : len(tt.in)-j]
    			ofb := cipher.NewOFB(c, tt.iv)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 08 04:08:51 UTC 2014
    - 3K bytes
    - Viewed (0)
  4. src/crypto/cipher/gcm.go

    		panic("crypto/cipher: incorrect GCM tag size")
    	}
    
    	if len(ciphertext) < g.tagSize {
    		return nil, errOpen
    	}
    	if uint64(len(ciphertext)) > ((1<<32)-2)*uint64(g.cipher.BlockSize())+uint64(g.tagSize) {
    		return nil, errOpen
    	}
    
    	tag := ciphertext[len(ciphertext)-g.tagSize:]
    	ciphertext = ciphertext[:len(ciphertext)-g.tagSize]
    
    	var counter, tagMask [gcmBlockSize]byte
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 18:57:38 UTC 2024
    - 13.7K bytes
    - Viewed (0)
  5. internal/kms/secret-key_test.go

    	if err != nil {
    		t.Fatalf("Failed to generate key: %v", err)
    	}
    	plaintext, err := KMS.Decrypt(context.TODO(), &DecryptRequest{
    		Name:       key.KeyID,
    		Ciphertext: key.Ciphertext,
    	})
    	if err != nil {
    		t.Fatalf("Failed to decrypt key: %v", err)
    	}
    	if !bytes.Equal(key.Plaintext, plaintext) {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue May 07 23:55:37 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  6. src/crypto/rsa/example_test.go

    	// encryption function.
    	rng := rand.Reader
    
    	ciphertext, err := rsa.EncryptOAEP(sha256.New(), rng, &test2048Key.PublicKey, secretMessage, label)
    	if err != nil {
    		fmt.Fprintf(os.Stderr, "Error from encryption: %s\n", err)
    		return
    	}
    
    	// Since encryption is a randomized function, ciphertext will be
    	// different each time.
    	fmt.Printf("Ciphertext: %x\n", ciphertext)
    }
    
    func ExampleDecryptOAEP() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 22 22:52:37 UTC 2023
    - 5.8K bytes
    - Viewed (0)
  7. src/crypto/rsa/pkcs1v15_test.go

    	},
    }
    
    func TestDecryptPKCS1v15(t *testing.T) {
    	decryptionFuncs := []func([]byte) ([]byte, error){
    		func(ciphertext []byte) (plaintext []byte, err error) {
    			return DecryptPKCS1v15(nil, rsaPrivateKey, ciphertext)
    		},
    		func(ciphertext []byte) (plaintext []byte, err error) {
    			return rsaPrivateKey.Decrypt(nil, ciphertext, nil)
    		},
    	}
    
    	for _, decryptFunc := range decryptionFuncs {
    		for i, test := range decryptPKCS1v15Tests {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 15 00:16:30 UTC 2022
    - 8.6K bytes
    - Viewed (0)
  8. src/crypto/tls/key_agreement.go

    	if len(ckx.ciphertext) < 2 {
    		return nil, errClientKeyExchange
    	}
    	ciphertextLen := int(ckx.ciphertext[0])<<8 | int(ckx.ciphertext[1])
    	if ciphertextLen != len(ckx.ciphertext)-2 {
    		return nil, errClientKeyExchange
    	}
    	ciphertext := ckx.ciphertext[2:]
    
    	priv, ok := cert.PrivateKey.(crypto.Decrypter)
    	if !ok {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 14:56:25 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  9. src/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305.go

    func (c *chacha20poly1305) Open(dst, nonce, ciphertext, additionalData []byte) ([]byte, error) {
    	if len(nonce) != NonceSize {
    		panic("chacha20poly1305: bad nonce length passed to Open")
    	}
    	if len(ciphertext) < 16 {
    		return nil, errOpen
    	}
    	if uint64(len(ciphertext)) > (1<<38)-48 {
    		panic("chacha20poly1305: ciphertext too large")
    	}
    
    	return c.open(dst, nonce, ciphertext, additionalData)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 09 20:10:44 UTC 2021
    - 2.8K bytes
    - Viewed (0)
  10. src/vendor/golang.org/x/crypto/chacha20poly1305/xchacha20poly1305.go

    }
    
    func (x *xchacha20poly1305) Open(dst, nonce, ciphertext, additionalData []byte) ([]byte, error) {
    	if len(nonce) != NonceSizeX {
    		panic("chacha20poly1305: bad nonce length passed to Open")
    	}
    	if len(ciphertext) < 16 {
    		return nil, errOpen
    	}
    	if uint64(len(ciphertext)) > (1<<38)-48 {
    		panic("chacha20poly1305: ciphertext too large")
    	}
    
    	c := new(chacha20poly1305)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 09 20:10:44 UTC 2021
    - 2.5K bytes
    - Viewed (0)
Back to top