Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 23 for plaintext (0.2 sec)

  1. internal/kms/kes.go

    	c.lock.RLock()
    	defer c.lock.RUnlock()
    
    	plaintexts := make([][]byte, 0, len(ciphertexts))
    	for i := range ciphertexts {
    		ctxBytes, err := contexts[i].MarshalText()
    		if err != nil {
    			return nil, err
    		}
    		plaintext, err := c.client.Decrypt(ctx, keyID, ciphertexts[i], ctxBytes)
    		if err != nil {
    			return nil, err
    		}
    		plaintexts = append(plaintexts, plaintext)
    	}
    	return plaintexts, nil
    }
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Apr 16 15:43:39 GMT 2024
    - 14.9K bytes
    - Viewed (0)
  2. internal/config/crypto_test.go

    		var (
    			data      = make([]byte, size)
    			plaintext = bytes.NewReader(data)
    			context   = kms.Context{"key": "value"}
    		)
    		b.SetBytes(int64(size))
    		for i := 0; i < b.N; i++ {
    			ciphertext, err := Encrypt(KMS, plaintext, context)
    			if err != nil {
    				b.Fatal(err)
    			}
    			if _, err = io.Copy(io.Discard, ciphertext); err != nil {
    				b.Fatal(err)
    			}
    			plaintext.Reset(data)
    		}
    	}
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Sep 19 18:05:16 GMT 2022
    - 3.2K bytes
    - Viewed (0)
  3. internal/etag/etag_test.go

    var decryptTests = []struct {
    	Key       []byte
    	ETag      ETag
    	Plaintext ETag
    }{
    	{ // 0
    		Key:       make([]byte, 32),
    		ETag:      must("3b83ef96387f14655fc854ddc3c6bd57"),
    		Plaintext: must("3b83ef96387f14655fc854ddc3c6bd57"),
    	},
    	{ // 1
    		Key:       make([]byte, 32),
    		ETag:      must("7b976cc68452e003eec7cb0eb631a19a-1"),
    		Plaintext: must("7b976cc68452e003eec7cb0eb631a19a-1"),
    	},
    	{ // 2
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Sep 18 17:00:54 GMT 2023
    - 12.6K bytes
    - Viewed (0)
  4. internal/etag/etag.go

    	if !etag.IsEncrypted() {
    		return etag, nil
    	}
    	mac := hmac.New(sha256.New, key)
    	mac.Write([]byte(HMACContext))
    	decryptionKey := mac.Sum(nil)
    
    	plaintext := make([]byte, 0, 16)
    	etag, err := sio.DecryptBuffer(plaintext, etag, sio.Config{
    		Key:          decryptionKey,
    		CipherSuites: fips.DARECiphers(),
    	})
    	if err != nil {
    		return nil, err
    	}
    	return etag, nil
    }
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sun Mar 10 21:09:36 GMT 2024
    - 13.3K bytes
    - Viewed (0)
  5. istioctl/pkg/clioptions/central.go

    	cmd.PersistentFlags().BoolVar(&o.InsecureSkipVerify, "insecure", viper.GetBool("INSECURE"),
    		"Skip server certificate and domain verification. (NOT SECURE!)")
    	cmd.PersistentFlags().BoolVar(&o.Plaintext, "plaintext", viper.GetBool("PLAINTEXT"),
    		"Use plain-text HTTP/2 when connecting to server (no TLS).")
    }
    
    // ValidateControlPlaneFlags checks arguments for valid values and combinations
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Mon Jun 06 03:39:27 GMT 2022
    - 3.2K bytes
    - Viewed (0)
  6. internal/kms/dek_test.go

    	Key DEK
    }{
    	{
    		Key: DEK{},
    	},
    	{
    		Key: DEK{
    			Plaintext:  nil,
    			Ciphertext: mustDecodeB64("eyJhZWFkIjoiQUVTLTI1Ni1HQ00tSE1BQy1TSEEtMjU2IiwiaXYiOiJ3NmhLUFVNZXVtejZ5UlVZL29pTFVBPT0iLCJub25jZSI6IktMSEU3UE1jRGo2N2UweHkiLCJieXRlcyI6Ik1wUkhjQWJaTzZ1Sm5lUGJGcnpKTkxZOG9pdkxwTmlUcTNLZ0hWdWNGYkR2Y0RlbEh1c1lYT29zblJWVTZoSXIifQ=="),
    		},
    	},
    	{
    		Key: DEK{
    			Plaintext:  mustDecodeB64("GM2UvLXp/X8lzqq0mibFC0LayDCGlmTHQhYLj7qAy7Q="),
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Jun 01 21:59:40 GMT 2021
    - 2.2K bytes
    - Viewed (0)
  7. internal/kms/single-key.go

    	plaintexts := make([][]byte, 0, len(ciphertexts))
    	for i := range ciphertexts {
    		plaintext, err := kms.DecryptKey(keyID, ciphertexts[i], contexts[i])
    		if err != nil {
    			return nil, err
    		}
    		plaintexts = append(plaintexts, plaintext)
    	}
    	return plaintexts, nil
    }
    
    // Verify verifies all KMS endpoints and returns details
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Mar 01 21:09:42 GMT 2024
    - 7.9K bytes
    - Viewed (0)
  8. cmd/bucket-metadata.go

    	key, err := GlobalKMS.GenerateKey(ctx, "", kmsContext)
    	if err != nil {
    		return
    	}
    
    	outbuf := bytes.NewBuffer(nil)
    	objectKey := crypto.GenerateKey(key.Plaintext, rand.Reader)
    	sealedKey := objectKey.Seal(key.Plaintext, crypto.GenerateIV(rand.Reader), crypto.S3.String(), bucket, "")
    	crypto.S3.CreateMetadata(metadata, key.KeyID, key.Ciphertext, sealedKey)
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 16.5K bytes
    - Viewed (0)
  9. internal/kms/single-key_test.go

    	if err != nil {
    		t.Fatalf("Failed to generate key: %v", err)
    	}
    	plaintext, err := KMS.DecryptKey(key.KeyID, key.Ciphertext, Context{})
    	if err != nil {
    		t.Fatalf("Failed to decrypt key: %v", err)
    	}
    	if !bytes.Equal(key.Plaintext, plaintext) {
    		t.Fatalf("Decrypted key does not match generated one: got %x - want %x", key.Plaintext, plaintext)
    	}
    }
    
    func TestDecryptKey(t *testing.T) {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Jul 19 01:54:27 GMT 2022
    - 3K bytes
    - Viewed (0)
  10. internal/config/crypto.go

    	"github.com/secure-io/sio-go/sioutil"
    )
    
    // EncryptBytes encrypts the plaintext with a key managed by KMS.
    // 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
    	}
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Mar 06 16:56:10 GMT 2023
    - 4.8K bytes
    - Viewed (0)
Back to top