portainer/portainer · error

malformed ciphertext

Error message

malformed ciphertext

What it means

Error "malformed ciphertext" thrown in portainer/portainer.

Source

Thrown at pkg/libcrypto/decrypt.go:40

		// sha256 hash 32 bytes
		hashKey = HashFromBytes(key)
	} else {
		// 16 byte hash, hex encoded is 32 bytes
		hashKey = InsecureHash32Bytes(key)
	}

	block, err := aes.NewCipher(hashKey)
	if err != nil {
		return nil, err
	}

	gcm, err := cipher.NewGCMWithRandomNonce(block)
	if err != nil {
		return nil, err
	}

	if len(data) < gcm.NonceSize() {
		return nil, errors.New("malformed ciphertext")
	}

	return gcm.Open(nil,
		nil,
		data,
		nil,
	)
}

View on GitHub (pinned to 17e74456ff)

When it happens

Trigger: Thrown at pkg/libcrypto/decrypt.go:40 when the library encounters an invalid state.

Common situations: See trigger scenarios.

Understand the failure class


AI-assisted analysis of portainer/portainer@17e74456ff (2026-08-26). Data as JSON: /api/errors/e483f8e00cf9863a. Report an issue: GitHub.