Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for generateKeys (0.09 sec)

  1. docs/debugging/inspect/main.go

    		}
    		fatalErr(err)
    	}
    
    	// Export xl.meta to stdout
    	if *export {
    		fatalErr(inspectToExportType(outputFileName, *djson))
    		os.Remove(outputFileName)
    	}
    }
    
    func generateKeys() {
    	privatekey, err := rsa.GenerateKey(crand.Reader, 2048)
    	if err != nil {
    		fmt.Printf("error generating key: %s n", err)
    		os.Exit(1)
    	}
    
    	// dump private key to file
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri May 31 14:49:23 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  2. internal/kms/conn.go

    	CreateKey(context.Context, *CreateKeyRequest) error
    
    	ListKeys(context.Context, *ListRequest) ([]madmin.KMSKeyInfo, string, error)
    
    	// GenerateKey generates a new data encryption key using the
    	// key referenced by the key ID.
    	//
    	// The KMS may use a default key if the key ID is empty.
    	// GenerateKey returns an error if the referenced key does
    	// not exist.
    	//
    	// The context is associated and tied to the generated DEK.
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sun Aug 18 06:43:03 UTC 2024
    - 5K bytes
    - Viewed (0)
  3. internal/kms/stub.go

    	if s.containsKeyName(req.Name) {
    		return ErrKeyExists
    	}
    	s.KeyNames = append(s.KeyNames, req.Name)
    	return nil
    }
    
    // GenerateKey is a non-functional stub.
    func (s StubKMS) GenerateKey(_ context.Context, req *GenerateKeyRequest) (DEK, error) {
    	if !s.containsKeyName(req.Name) {
    		return DEK{}, ErrKeyNotFound
    	}
    	return DEK{
    		KeyID:      req.Name,
    		Version:    0,
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sun Aug 18 06:43:03 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  4. internal/kms/kms.go

    	if req.Prefix == "*" {
    		req.Prefix = ""
    	}
    	return k.conn.ListKeys(ctx, req)
    }
    
    // GenerateKey generates a new data key using the master key req.Name.
    // It returns ErrKeyNotFound if the key does not exist. If req.Name is
    // empty, the KMS default key is used.
    func (k *KMS) GenerateKey(ctx context.Context, req *GenerateKeyRequest) (DEK, error) {
    	if req.Name == "" {
    		req.Name = k.DefaultKey
    	}
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sun Aug 18 06:43:03 UTC 2024
    - 11.5K bytes
    - Viewed (0)
  5. internal/crypto/key_test.go

    	logger.DisableLog = true
    
    	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
    			}
    		}()
    	}
    }
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Jul 12 20:51:54 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  6. internal/kms/secret-key.go

    	if req.Name != s.keyID {
    		return ErrNotSupported
    	}
    	return ErrKeyExists
    }
    
    // GenerateKey decrypts req.Ciphertext. The key name req.Name must match the key
    // name of the secretKey.
    //
    // The returned DEK is encrypted using AES-GCM and the ciphertext format is compatible
    // with KES and MinKMS.
    func (s secretKey) GenerateKey(_ context.Context, req *GenerateKeyRequest) (DEK, error) {
    	if req.Name != s.keyID {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sun Aug 18 06:43:03 UTC 2024
    - 8.3K bytes
    - Viewed (0)
  7. internal/kms/kes.go

    	}
    	return nil
    }
    
    // GenerateKey generates a new data encryption key using
    // the key at the KES server referenced by the key ID.
    //
    // The default key ID will be used if keyID is empty.
    //
    // The context is associated and tied to the generated DEK.
    // The same context must be provided when the generated
    // key should be decrypted.
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sun Aug 18 06:43:03 UTC 2024
    - 7.3K bytes
    - Viewed (0)
  8. cmd/encryption-v1.go

    		if GlobalKMS == nil {
    			return crypto.ObjectKey{}, errKMSNotConfigured
    		}
    		key, err := GlobalKMS.GenerateKey(ctx, &kms.GenerateKeyRequest{
    			AssociatedData: kms.Context{bucket: path.Join(bucket, object)},
    		})
    		if err != nil {
    			return crypto.ObjectKey{}, err
    		}
    
    		objectKey := crypto.GenerateKey(key.Plaintext, rand.Reader)
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sun Oct 13 13:06:08 UTC 2024
    - 37.2K bytes
    - Viewed (0)
  9. cmd/kms-handlers.go

    		return
    	}
    
    	kmsContext := kms.Context{"MinIO admin API": "KMSKeyStatusHandler"} // Context for a test key operation
    	// 1. Generate a new key using the KMS.
    	key, err := GlobalKMS.GenerateKey(ctx, &kms.GenerateKeyRequest{Name: keyID, AssociatedData: kmsContext})
    	if err != nil {
    		response.EncryptionErr = err.Error()
    		resp, err := json.Marshal(response)
    		if err != nil {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sun Aug 18 06:43:03 UTC 2024
    - 10.1K bytes
    - Viewed (0)
  10. cmd/bucket-encryption-handlers.go

    		return
    	}
    	kmsKey := encConfig.KeyID()
    	if kmsKey != "" {
    		kmsContext := kms.Context{"MinIO admin API": "ServerInfoHandler"} // Context for a test key operation
    		_, err := GlobalKMS.GenerateKey(ctx, &kms.GenerateKeyRequest{Name: kmsKey, AssociatedData: kmsContext})
    		if err != nil {
    			if errors.Is(err, kes.ErrKeyNotFound) {
    				writeErrorResponse(ctx, w, toAPIError(ctx, errKMSKeyNotFound), r.URL)
    				return
    			}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 6.4K bytes
    - Viewed (0)
Back to top