Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 200 for Key (0.11 sec)

  1. internal/crypto/key.go

    }
    
    // SealedKey represents a sealed object key. It can be stored
    // at an untrusted location.
    type SealedKey struct {
    	Key       [64]byte // The encrypted and authenticated object-key.
    	IV        [32]byte // The random IV used to encrypt the object-key.
    	Algorithm string   // The sealing algorithm used to encrypt the object key.
    }
    
    // Seal encrypts the ObjectKey using the 256 bit external key and IV. The sealed
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Mar 19 20:28:10 GMT 2024
    - 6.4K bytes
    - Viewed (0)
  2. internal/kms/key-manager.go

    )
    
    // KeyManager is the generic interface that handles KMS key operations
    type KeyManager interface {
    	// CreateKey creates a new key at the KMS with the given key ID.
    	CreateKey(ctx context.Context, keyID string) error
    
    	// DeleteKey deletes a key at the KMS with the given key ID.
    	// Please note that is a dangerous operation.
    	// Once a key has been deleted all data that has been encrypted with it cannot be decrypted
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Mar 01 21:09:42 GMT 2024
    - 1.9K bytes
    - Viewed (0)
  3. internal/kms/single-key.go

    	key, err := base64.StdEncoding.DecodeString(b64Key)
    	if err != nil {
    		return nil, err
    	}
    	return New(keyID, key)
    }
    
    // New returns a single-key KMS that derives new DEKs from the
    // given key.
    func New(keyID string, key []byte) (KMS, error) {
    	if len(key) != 32 {
    		return nil, errors.New("kms: invalid key length " + strconv.Itoa(len(key)))
    	}
    	return secretKey{
    		keyID: keyID,
    		key:   key,
    	}, nil
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Mar 01 21:09:42 GMT 2024
    - 7.9K bytes
    - Viewed (0)
  4. internal/crypto/key_test.go

    	for i, test := range generateKeyTests {
    		i, test := i, test
    		func() {
    			defer recoverTest(i, test.ShouldPass, t)
    			key := GenerateKey(test.ExtKey[:], test.Random)
    			if [32]byte(key) == [32]byte{} {
    				t.Errorf("Test %d: generated key is zero key", i) // check that we generate random and unique key
    			}
    		}()
    	}
    }
    
    var generateIVTests = []struct {
    	Random     io.Reader
    	ShouldPass bool
    }{
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Feb 02 00:13:57 GMT 2024
    - 6.8K bytes
    - Viewed (0)
  5. internal/kms/single-key_test.go

    func TestSingleKeyRoundtrip(t *testing.T) {
    	KMS, err := Parse("my-key:eEm+JI9/q4JhH8QwKvf3LKo4DEBl6QbfvAl1CAbMIv8=")
    	if err != nil {
    		t.Fatalf("Failed to initialize KMS: %v", err)
    	}
    
    	key, err := KMS.GenerateKey(context.Background(), "my-key", Context{})
    	if err != nil {
    		t.Fatalf("Failed to generate key: %v", err)
    	}
    	plaintext, err := KMS.DecryptKey(key.KeyID, key.Ciphertext, Context{})
    	if err != nil {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Jul 19 01:54:27 GMT 2022
    - 3K bytes
    - Viewed (0)
  6. internal/config/identity/openid/jwks.go

    }
    
    var (
    	errMalformedJWKRSAKey = errors.New("malformed JWK RSA key")
    	errMalformedJWKECKey  = errors.New("malformed JWK EC key")
    )
    
    // DecodePublicKey - decodes JSON Web Key (JWK) as public key
    func (key *JWKS) DecodePublicKey() (crypto.PublicKey, error) {
    	switch key.Kty {
    	case "RSA":
    		if key.N == "" || key.E == "" {
    			return nil, errMalformedJWKRSAKey
    		}
    
    		// decode exponent
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Apr 02 23:02:35 GMT 2024
    - 3.1K bytes
    - Viewed (0)
  7. internal/crypto/doc.go

    // in a sealed from. The sealed 'ObjectKey' is created by encrypting the 'ObjectKey'
    // with an unique key-encryption-key. Given the correct key-encryption-key the
    // sealed 'ObjectKey' can be unsealed and the object can be decrypted.
    //
    // ## SSE-C
    //
    // SSE-C computes the key-encryption-key from the client-provided key, an
    // initialization vector (IV) and the bucket/object path.
    //
    //  1. Encrypt:
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Aug 26 19:52:29 GMT 2022
    - 5K bytes
    - Viewed (0)
  8. internal/config/certs.go

    	}
    	key, rest := pem.Decode(keyPEMBlock)
    	if len(rest) > 0 {
    		return tls.Certificate{}, ErrTLSUnexpectedData(nil).Msg("The private key contains additional data")
    	}
    	if key == nil {
    		return tls.Certificate{}, ErrTLSUnexpectedData(nil).Msg("The private key is not readable")
    	}
    	if x509.IsEncryptedPEMBlock(key) {
    		password := env.Get(EnvCertPassword, "")
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Sep 04 19:57:37 GMT 2023
    - 3.8K bytes
    - Viewed (0)
  9. internal/kms/dek_test.go

    		text, err := test.Key.MarshalText()
    		if err != nil {
    			t.Fatalf("Test %d: failed to marshal DEK: %v", i, err)
    		}
    
    		var key DEK
    		if err = key.UnmarshalText(text); err != nil {
    			t.Fatalf("Test %d: failed to unmarshal DEK: %v", i, err)
    		}
    		if key.Plaintext != nil {
    			t.Fatalf("Test %d: unmarshaled DEK contains non-nil plaintext", i)
    		}
    		if !bytes.Equal(key.Ciphertext, test.Key.Ciphertext) {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Jun 01 21:59:40 GMT 2021
    - 2.2K bytes
    - Viewed (0)
  10. internal/config/help.go

    	MultipleTargets bool `json:"multipleTargets"`
    }
    
    // HelpKVS - implement order of keys help messages.
    type HelpKVS []HelpKV
    
    // Lookup - lookup a key from help kvs.
    func (hkvs HelpKVS) Lookup(key string) (HelpKV, bool) {
    	for _, hkv := range hkvs {
    		if hkv.Key == key {
    			return hkv, true
    		}
    	}
    	return HelpKV{}, false
    }
    
    // DefaultComment used across all sub-systems.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Jun 23 14:45:27 GMT 2023
    - 2.8K bytes
    - Viewed (0)
Back to top