Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for mac (0.14 sec)

  1. internal/kms/single-key.go

    		algorithm = algorithmAESGCM
    	} else {
    		algorithm = algorithmChaCha20Poly1305
    	}
    
    	var aead cipher.AEAD
    	switch algorithm {
    	case algorithmAESGCM:
    		mac := hmac.New(sha256.New, kms.key)
    		mac.Write(iv)
    		sealingKey := mac.Sum(nil)
    
    		var block cipher.Block
    		block, err = aes.NewCipher(sealingKey)
    		if err != nil {
    			return DEK{}, err
    		}
    		aead, err = cipher.NewGCM(block)
    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)
  2. cmd/encryption-v1.go

    		return err
    	}
    
    	var partIDbin [4]byte
    	binary.LittleEndian.PutUint32(partIDbin[:], uint32(partID)) // marshal part ID
    
    	mac := hmac.New(sha256.New, objectEncryptionKey) // derive part encryption key from part ID and object key
    	mac.Write(partIDbin[:])
    	partEncryptionKey := mac.Sum(nil)
    
    	// Limit the reader, so the decryptor doesn't receive bytes
    	// from the next part (different DARE stream)
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 36.5K bytes
    - Viewed (0)
  3. internal/crypto/key.go

    	}
    	var (
    		sealingKey   [32]byte
    		encryptedKey bytes.Buffer
    	)
    	mac := hmac.New(sha256.New, extKey)
    	mac.Write(iv[:])
    	mac.Write([]byte(domain))
    	mac.Write([]byte(SealAlgorithm))
    	mac.Write([]byte(path.Join(bucket, object))) // use path.Join for canonical 'bucket/object'
    	mac.Sum(sealingKey[:0])
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Mar 19 20:28:10 GMT 2024
    - 6.4K bytes
    - Viewed (0)
  4. cmd/generic-handlers_test.go

    		shouldFail: false,
    	},
    	{
    		header:     http.Header{crypto.MetaAlgorithm: []string{crypto.InsecureSealAlgorithm}},
    		shouldFail: false,
    	},
    	{
    		header:     http.Header{crypto.MetaSealedKeySSEC: []string{"mac"}},
    		shouldFail: false,
    	},
    	{
    		header:     http.Header{ReservedMetadataPrefix + "Key": []string{"value"}},
    		shouldFail: true,
    	},
    }
    
    func TestContainsReservedMetadata(t *testing.T) {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Mar 28 17:44:56 GMT 2024
    - 5.4K bytes
    - Viewed (0)
  5. cmd/encryption-v1_test.go

    		}
    		if iv, ok := test.metadata[crypto.MetaIV]; !ok {
    			t.Errorf("Test %d: crypto.SSEIV must be part of metadata: %v", i, iv)
    		}
    		if mac, ok := test.metadata[crypto.MetaSealedKeySSEC]; !ok {
    			t.Errorf("Test %d: ServerSideEncryptionKeyMAC must be part of metadata: %v", i, mac)
    		}
    	}
    }
    
    var decryptObjectMetaTests = []struct {
    	info    ObjectInfo
    	request *http.Request
    	expErr  error
    }{
    	{
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sat Sep 24 04:17:08 GMT 2022
    - 19.9K bytes
    - Viewed (0)
  6. internal/etag/etag.go

    // the ETag unmodified.
    func Decrypt(key []byte, etag ETag) (ETag, error) {
    	const HMACContext = "SSE-etag"
    
    	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(),
    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)
Back to top