Skip to content

Comments

Fix cipher block size as IV length for legacy credential activation#420

Open
hslatman wants to merge 1 commit intogoogle:mainfrom
hslatman:credactivation-blocksize
Open

Fix cipher block size as IV length for legacy credential activation#420
hslatman wants to merge 1 commit intogoogle:mainfrom
hslatman:credactivation-blocksize

Conversation

@hslatman
Copy link
Contributor

@hslatman hslatman commented Dec 17, 2025

This is similar to https://github.com/google/go-tpm/blob/main/tpm2/child_object_crypto.go#L46, but for the legacy/tpm2 package.

@hslatman hslatman requested a review from a team as a code owner December 17, 2025 21:49
Copy link
Member

@josephlr josephlr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

Per https://pkg.go.dev/crypto/cipher#NewCFBEncrypter:

The iv must be the same length as the Block's block size.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants