Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 84 for decrypto (0.22 sec)

  1. internal/config/crypto.go

    	buffer.Write(metadata)
    
    	return io.MultiReader(
    		&buffer,
    		stream.EncryptReader(plaintext, nonce, nil),
    	), nil
    }
    
    // Decrypt decrypts the ciphertext using a key managed by the KMS.
    // The same context that have been used during encryption must be
    // provided.
    func Decrypt(k *kms.KMS, ciphertext io.Reader, associatedData kms.Context) (io.Reader, error) {
    	const (
    		MaxMetadataSize = 1 << 20 // max. size of the metadata
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue May 07 23:55:37 UTC 2024
    - 5K bytes
    - Viewed (0)
  2. docs/debugging/inspect/main.go

    package main
    
    import (
    	"bufio"
    	crand "crypto/rand"
    	"crypto/rsa"
    	"crypto/x509"
    	"encoding/json"
    	"encoding/pem"
    	"errors"
    	"flag"
    	"fmt"
    	"io"
    	"os"
    	"strings"
    	"time"
    
    	"github.com/klauspost/filepathx"
    )
    
    var (
    	keyHex      = flag.String("key", "", "decryption key")
    	privKeyPath = flag.String("private-key", "support_private.pem", "private key")
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 31 14:49:23 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  3. internal/kms/secret-key.go

    		Plaintext:  plaintext,
    		Ciphertext: ciphertext,
    	}, nil
    }
    
    // Decrypt decrypts req.Ciphertext. The key name req.Name must match the key
    // name of the secretKey.
    //
    // Decrypt supports decryption of binary-encoded ciphertexts, as produced by KES
    // and MinKMS, and legacy JSON formatted ciphertexts.
    func (s secretKey) Decrypt(_ context.Context, req *DecryptRequest) ([]byte, error) {
    	if req.Name != s.keyID {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue May 07 23:55:37 UTC 2024
    - 8.2K bytes
    - Viewed (0)
  4. security/pkg/pki/util/crypto.go

    // See the License for the specific language governing permissions and
    // limitations under the License.
    
    package util
    
    import (
    	"bytes"
    	"crypto"
    	"crypto/ecdsa"
    	"crypto/elliptic"
    	"crypto/rsa"
    	"crypto/x509"
    	"encoding/pem"
    	"fmt"
    	"reflect"
    	"strings"
    )
    
    const (
    	blockTypeECPrivateKey    = "EC PRIVATE KEY"
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Jun 04 13:00:07 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  5. internal/crypto/sse-s3.go

    		return key, err
    	}
    	unsealKey, err := k.Decrypt(context.TODO(), &kms.DecryptRequest{
    		Name:           keyID,
    		Ciphertext:     kmsKey,
    		AssociatedData: kms.Context{bucket: path.Join(bucket, object)},
    	})
    	if err != nil {
    		return key, err
    	}
    	err = key.Unseal(unsealKey, sealedKey, s3.String(), bucket, object)
    	return key, err
    }
    
    // UnsealObjectsKeys extracts and decrypts all sealed object keys
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue May 07 23:55:37 UTC 2024
    - 7.6K bytes
    - Viewed (0)
  6. internal/config/certs.go

    // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    package config
    
    import (
    	"bytes"
    	"crypto/tls"
    	"crypto/x509"
    	"encoding/pem"
    	"errors"
    	"os"
    
    	"github.com/minio/pkg/v3/env"
    )
    
    // EnvCertPassword is the environment variable which contains the password used
    // to decrypt the TLS private key. It must be set if the TLS private key is
    // password protected.
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  7. internal/kms/secret-key_test.go

    	if err != nil {
    		t.Fatalf("Failed to generate key: %v", err)
    	}
    	plaintext, err := KMS.Decrypt(context.TODO(), &DecryptRequest{
    		Name:       key.KeyID,
    		Ciphertext: key.Ciphertext,
    	})
    	if err != nil {
    		t.Fatalf("Failed to decrypt key: %v", err)
    	}
    	if !bytes.Equal(key.Plaintext, plaintext) {
    		t.Fatalf("Decrypted key does not match generated one: got %x - want %x", key.Plaintext, plaintext)
    	}
    }
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue May 07 23:55:37 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  8. internal/kms/kes.go

    		return nil, err
    	}
    	return c.client.Encrypt(context.Background(), keyID, plaintext, ctxBytes)
    }
    
    // DecryptKey decrypts the ciphertext with the key at the KES
    // server referenced by the key ID. The context must match the
    // context value used to generate the ciphertext.
    func (c *kesConn) Decrypt(ctx context.Context, req *DecryptRequest) ([]byte, error) {
    	aad, err := req.AssociatedData.MarshalText()
    	if err != nil {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue May 07 23:55:37 UTC 2024
    - 7.1K bytes
    - Viewed (0)
  9. internal/kms/conn.go

    	// The same context must be provided when the generated key
    	// should be decrypted. Therefore, it is the callers
    	// responsibility to remember the corresponding context for
    	// a particular DEK. The context may be nil.
    	GenerateKey(context.Context, *GenerateKeyRequest) (DEK, error)
    
    	// DecryptKey decrypts the ciphertext with the key referenced
    	// by the key ID. The context must match the context value
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue May 07 23:55:37 UTC 2024
    - 5K bytes
    - Viewed (0)
  10. src/crypto/des/cipher.go

    	if len(src) < BlockSize {
    		panic("crypto/des: input not full block")
    	}
    	if len(dst) < BlockSize {
    		panic("crypto/des: output not full block")
    	}
    	if alias.InexactOverlap(dst[:BlockSize], src[:BlockSize]) {
    		panic("crypto/des: invalid buffer overlap")
    	}
    	cryptBlock(c.subkeys[:], dst, src, false)
    }
    
    func (c *desCipher) Decrypt(dst, src []byte) {
    	if len(src) < BlockSize {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 18:57:38 UTC 2024
    - 4K bytes
    - Viewed (0)
Back to top