Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 18 for Ciphertext (0.12 seconds)

The search processing time has exceeded the limit. The displayed results may be partial.

  1. internal/kms/secret-key.go

    // and MinKMS, and legacy JSON formatted ciphertexts.
    func (s secretKey) Decrypt(_ context.Context, req *DecryptRequest) ([]byte, error) {
    	if req.Name != s.keyID {
    		return nil, ErrKeyNotFound
    	}
    
    	const randSize = 28
    	ciphertext, keyType := parseCiphertext(req.Ciphertext)
    	ciphertext, random := ciphertext[:len(ciphertext)-randSize], ciphertext[len(ciphertext)-randSize:]
    Created: Sun Dec 28 19:28:13 GMT 2025
    - Last Modified: Mon Apr 21 16:23:51 GMT 2025
    - 8.4K bytes
    - Click Count (0)
  2. internal/config/crypto.go

    // The context is bound to the returned ciphertext.
    //
    // The same context must be provided when decrypting the
    // ciphertext.
    func EncryptBytes(k *kms.KMS, plaintext []byte, context kms.Context) ([]byte, error) {
    	ciphertext, err := Encrypt(k, bytes.NewReader(plaintext), context)
    	if err != nil {
    		return nil, err
    	}
    	return io.ReadAll(ciphertext)
    }
    
    Created: Sun Dec 28 19:28:13 GMT 2025
    - Last Modified: Fri May 16 14:27:42 GMT 2025
    - 4.7K bytes
    - Click Count (0)
  3. internal/kms/secret-key_test.go

    	if err != nil {
    		t.Fatalf("Failed to generate key: %v", err)
    	}
    	plaintext, err := KMS.Decrypt(t.Context(), &DecryptRequest{
    		Name:       key.KeyID,
    		Ciphertext: key.Ciphertext,
    	})
    	if err != nil {
    		t.Fatalf("Failed to decrypt key: %v", err)
    	}
    	if !bytes.Equal(key.Plaintext, plaintext) {
    Created: Sun Dec 28 19:28:13 GMT 2025
    - Last Modified: Wed Apr 09 14:28:39 GMT 2025
    - 2.9K bytes
    - Click Count (0)
  4. src/main/java/jcifs/internal/smb2/Smb2EncryptionContext.java

                    // Process AAD (not included in ciphertext)
                    cipher.processAADBytes(associatedData, 0, associatedData.length);
    
                    // Process ciphertext + auth tag
                    final byte[] input = new byte[ciphertext.length + authTag.length];
                    System.arraycopy(ciphertext, 0, input, 0, ciphertext.length);
    Created: Sat Dec 20 13:44:44 GMT 2025
    - Last Modified: Sun Aug 31 08:00:57 GMT 2025
    - 35.5K bytes
    - Click Count (0)
  5. src/main/java/jcifs/smb1/util/DES.java

         * @param clearText the 8-byte plaintext block
         * @param cipherText the output 8-byte ciphertext block
         */
        public void encrypt(final byte[] clearText, final byte[] cipherText) {
            encrypt(clearText, 0, cipherText, 0);
        }
    
        /// Decrypt a block of bytes.
        /**
         * Decrypts an 8-byte block using DES
         * @param cipherText the 8-byte ciphertext block
         * @param clearText the output 8-byte plaintext block
    Created: Sat Dec 20 13:44:44 GMT 2025
    - Last Modified: Sat Aug 30 05:58:03 GMT 2025
    - 22.7K bytes
    - Click Count (0)
  6. src/main/java/jcifs/util/SecureCredentialStorage.java

                // Encrypt
                byte[] ciphertext = cipher.doFinal(plaintextBytes);
    
                // Combine IV and ciphertext
                byte[] result = new byte[GCM_IV_SIZE + ciphertext.length];
                System.arraycopy(iv, 0, result, 0, GCM_IV_SIZE);
                System.arraycopy(ciphertext, 0, result, GCM_IV_SIZE, ciphertext.length);
    
                return result;
    
            } finally {
    Created: Sat Dec 20 13:44:44 GMT 2025
    - Last Modified: Sat Aug 30 05:58:03 GMT 2025
    - 12.7K bytes
    - Click Count (0)
  7. internal/kms/kms.go

    		Version:    resp[0].Version,
    		Plaintext:  resp[0].Plaintext,
    		Ciphertext: resp[0].Ciphertext,
    	}, nil
    }
    
    func (c *kmsConn) Decrypt(ctx context.Context, req *DecryptRequest) ([]byte, error) {
    	aad, err := req.AssociatedData.MarshalText()
    	if err != nil {
    		return nil, err
    	}
    
    	ciphertext, _ := parseCiphertext(req.Ciphertext)
    	resp, err := c.client.Decrypt(ctx, c.enclave, &kms.DecryptRequest{
    Created: Sun Dec 28 19:28:13 GMT 2025
    - Last Modified: Thu Apr 24 15:33:57 GMT 2025
    - 11.4K bytes
    - Click Count (0)
  8. internal/config/crypto_test.go

    	if err != nil {
    		t.Fatalf("Failed to create KMS: %v", err)
    	}
    
    	for i, test := range encryptDecryptTests {
    		ciphertext, err := Encrypt(KMS, bytes.NewReader(test.Data), test.Context)
    		if err != nil {
    			t.Fatalf("Test %d: failed to encrypt stream: %v", i, err)
    		}
    		data, err := io.ReadAll(ciphertext)
    		if err != nil {
    			t.Fatalf("Test %d: failed to encrypt stream: %v", i, err)
    		}
    
    Created: Sun Dec 28 19:28:13 GMT 2025
    - Last Modified: Fri Aug 29 02:39:48 GMT 2025
    - 3.2K bytes
    - Click Count (0)
  9. internal/kms/kes.go

    		}
    		if errors.Is(err, kes.ErrNotAllowed) {
    			return DEK{}, ErrPermission
    		}
    		return DEK{}, errKeyGenerationFailed(err)
    	}
    	return DEK{
    		KeyID:      name,
    		Plaintext:  dek.Plaintext,
    		Ciphertext: dek.Ciphertext,
    	}, nil
    }
    
    // ImportKey imports a cryptographic key into the KMS.
    func (c *kesConn) ImportKey(ctx context.Context, keyID string, bytes []byte) error {
    Created: Sun Dec 28 19:28:13 GMT 2025
    - Last Modified: Sun Aug 18 06:43:03 GMT 2024
    - 7.3K bytes
    - Click Count (0)
  10. internal/kms/errors.go

    		Err:     "key with given key ID does not exist",
    	}
    
    	// ErrDecrypt is an error returned by the KMS when the decryption
    	// of a ciphertext failed.
    	ErrDecrypt = Error{
    		Code:    http.StatusBadRequest,
    		APICode: "kms:InvalidCiphertextException",
    		Err:     "failed to decrypt ciphertext",
    	}
    
    	// ErrNotSupported is an error returned by the KMS when the requested
    	// functionality is not supported by the KMS service.
    Created: Sun Dec 28 19:28:13 GMT 2025
    - Last Modified: Tue Jul 16 14:03:03 GMT 2024
    - 3.6K bytes
    - Click Count (0)
Back to Top