Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 29 for IV (0.01 sec)

  1. internal/crypto/metadata_test.go

    			t.Errorf("Test %d: got sealed key '%v' - want sealed key '%v'", i, sealedKey.Key, test.SealedKey.Key)
    		}
    		if !bytes.Equal(sealedKey.IV[:], test.SealedKey.IV[:]) {
    			t.Errorf("Test %d: got sealed key IV '%v' - want sealed key IV '%v'", i, sealedKey.IV, test.SealedKey.IV)
    		}
    	}
    }
    
    var ssecParseMetadataTests = []struct {
    	Metadata    map[string]string
    	ExpectedErr error
    
    	SealedKey SealedKey
    }{
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Jul 12 20:51:54 UTC 2024
    - 18.7K bytes
    - Viewed (0)
  2. internal/crypto/doc.go

    // initialization vector (IV) and the bucket/object path.
    //
    //  1. Encrypt:
    //     Input: ClientKey, bucket, object, metadata, object_data
    //     -              IV := Random({0,1}²⁵⁶)
    //     -       ObjectKey := SHA256(ClientKey || Random({0,1}²⁵⁶))
    //     -       KeyEncKey := HMAC-SHA256(ClientKey, IV || 'SSE-C' || 'DAREv2-HMAC-SHA256' || bucket || '/' || object)
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Aug 26 19:52:29 UTC 2022
    - 5K bytes
    - Viewed (0)
  3. internal/crypto/key_test.go

    	for i, test := range generateIVTests {
    		i, test := i, test
    		func() {
    			defer recoverTest(i, test.ShouldPass, t)
    			iv := GenerateIV(test.Random)
    			if iv == [32]byte{} {
    				t.Errorf("Test %d: generated IV is zero IV", i) // check that we generate random and unique IV
    			}
    		}()
    	}
    }
    
    var sealUnsealKeyTests = []struct {
    	SealExtKey, SealIV                 [32]byte
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Jul 12 20:51:54 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  4. internal/crypto/key.go

    }
    
    // GenerateIV generates a new random 256 bit IV from the provided source
    // of randomness. If random is nil the default PRNG of the system
    // (crypto/rand) is used.
    func GenerateIV(random io.Reader) (iv [32]byte) {
    	if random == nil {
    		random = rand.Reader
    	}
    	if _, err := io.ReadFull(random, iv[:]); err != nil {
    		logger.CriticalIf(context.Background(), errOutOfEntropy)
    	}
    	return iv
    }
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Mar 19 20:28:10 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  5. internal/kms/secret-key.go

    		ID        string `json:"id"`
    		IV        []byte `json:"iv"`
    		Nonce     []byte `json:"nonce"`
    		Bytes     []byte `json:"bytes"`
    	}
    	var value JSON
    	if err := json.Unmarshal(text, &value); err != nil {
    		return ErrDecrypt
    	}
    
    	if value.Algorithm != AES256GCM && value.Algorithm != CHACHA20POLY1305 {
    		return ErrDecrypt
    	}
    	if len(value.IV) != IVSize {
    		return ErrDecrypt
    	}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sun Aug 18 06:43:03 UTC 2024
    - 8.3K bytes
    - Viewed (0)
  6. tests/joins_test.go

    	}
    
    	iv := DB.Table(`table_invoices`).Select(`seller, SUM(total) as total, SUM(paid) as paid, SUM(balance) as balance`).Group(`seller`)
    	stmt = dryDB.Table(`table_employees`).Select(`id, name, iv.total, iv.paid, iv.balance`).Joins(`LEFT JOIN (?) AS iv ON iv.seller = table_employees.id`, iv).Scan(&user).Statement
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Mon Jun 17 03:58:13 UTC 2024
    - 15K bytes
    - Viewed (0)
  7. internal/crypto/sse-c.go

    	if !ok {
    		return sealedKey, Errorf("The object metadata is missing the internal sealed key for SSE-C")
    	}
    
    	// Check whether all extracted values are well-formed
    	iv, err := base64.StdEncoding.DecodeString(b64IV)
    	if err != nil || len(iv) != 32 {
    		return sealedKey, errInvalidInternalIV
    	}
    	if algorithm != SealAlgorithm && algorithm != InsecureSealAlgorithm {
    		return sealedKey, errInvalidInternalSealAlgorithm
    	}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Jan 18 07:03:17 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  8. internal/crypto/sse-s3.go

    		return keyID, kmsKey, sealedKey, Errorf("The object metadata is missing the internal sealed KMS data key for SSE-S3")
    	}
    
    	// Check whether all extracted values are well-formed
    	iv, err := base64.StdEncoding.DecodeString(b64IV)
    	if err != nil || len(iv) != 32 {
    		return keyID, kmsKey, sealedKey, errInvalidInternalIV
    	}
    	if algorithm != SealAlgorithm {
    		return keyID, kmsKey, sealedKey, errInvalidInternalSealAlgorithm
    	}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue May 07 23:55:37 UTC 2024
    - 7.6K bytes
    - Viewed (0)
  9. internal/crypto/sse-kms.go

    		return keyID, kmsKey, sealedKey, ctx, Errorf("The object metadata is missing the internal sealed KMS data key for SSE-S3")
    	}
    
    	// Check whether all extracted values are well-formed
    	iv, err := base64.StdEncoding.DecodeString(b64IV)
    	if err != nil || len(iv) != 32 {
    		return keyID, kmsKey, sealedKey, ctx, errInvalidInternalIV
    	}
    	if algorithm != SealAlgorithm {
    		return keyID, kmsKey, sealedKey, ctx, errInvalidInternalSealAlgorithm
    	}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue May 07 23:55:37 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  10. internal/kms/secret-key_test.go

    		Ciphertext: `{"aead":"ChaCha20Poly1305","iv":"JbI+vwvYww1lCb5VpkAFuQ==","nonce":"ARjIjJxBSD541Gz8","bytes":"KCbEc2sA0TLvA7aWTWa23AdccVfJMpOxwgG8hm+4PaNrxYfy1xFWZg2gEenVrOgv"}`,
    	},
    	{
    		KeyID:      "my-key",
    		Plaintext:  "UnPWsZgVI+T4L9WGNzFlP1PsP1Z6hn2Fx8ISeZfDGnA=",
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue May 07 23:55:37 UTC 2024
    - 2.9K bytes
    - Viewed (0)
Back to top