Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for SealedKey (0.07 sec)

  1. internal/crypto/metadata_test.go

    		if sealedKey.Algorithm != test.SealedKey.Algorithm {
    			t.Errorf("Test %d: seal algorithm mismatch: got '%s' - want '%s'", i, sealedKey.Algorithm, test.SealedKey.Algorithm)
    		}
    		if !bytes.Equal(sealedKey.IV[:], test.SealedKey.IV[:]) {
    			t.Errorf("Test %d: IV mismatch: got '%v' - want '%v'", i, sealedKey.IV, test.SealedKey.IV)
    		}
    		if !bytes.Equal(sealedKey.Key[:], test.SealedKey.Key[:]) {
    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/key_test.go

    	var extKey, iv [32]byte
    	key := GenerateKey(extKey[:], rand.Reader)
    	sealedKey := key.Seal(extKey[:], iv, "SSE-S3", "bucket", "object")
    	sealedKey.Algorithm = InsecureSealAlgorithm
    	if err := key.Unseal(extKey[:], sealedKey, "SSE-S3", "bucket", "object"); err == nil {
    		t.Errorf("'%s' test succeeded but it should fail because the legacy algorithm was used", sealedKey.Algorithm)
    	}
    }
    
    var derivePartKeyTest = []struct {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Jul 12 20:51:54 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  3. cmd/encryption-v1.go

    			AssociatedData: kmsCtx,
    		})
    		if err != nil {
    			return err
    		}
    
    		sealedKey := objectKey.Seal(newKey.Plaintext, crypto.GenerateIV(rand.Reader), crypto.S3KMS.String(), bucket, object)
    		crypto.S3KMS.CreateMetadata(metadata, newKey.KeyID, newKey.Ciphertext, sealedKey, cryptoCtx)
    		return nil
    	case crypto.SSEC:
    		sealedKey, err := crypto.SSEC.ParseMetadata(metadata)
    		if err != nil {
    			return err
    		}
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sun Oct 13 13:06:08 UTC 2024
    - 37.2K bytes
    - Viewed (0)
  4. cmd/bucket-metadata.go

    	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)
    	_, err = sio.Encrypt(outbuf, bytes.NewBuffer(input), sio.Config{Key: objectKey[:], MinVersion: sio.Version20, CipherSuites: fips.DARECiphers()})
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Aug 28 15:32:18 UTC 2024
    - 18.2K bytes
    - Viewed (0)
Back to top