Skip to content

Conversation

reaperhulk
Copy link
Member

If we decide we like this we can implement it for every KDF. refs #13245

:raises ValueError: This exception is raised if the buffer is too small
for the derived key.
:raises cryptography.exceptions.AlreadyFinalized: This is raised when
:meth:`derive_into`
Copy link
Member

Choose a reason for hiding this comment

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

Hmm, its really when any combination of the two methods is called more than once.

:raises ValueError: This exception is raised if the buffer is too small
for the derived key.
:raises cryptography.exceptions.AlreadyFinalized: This is raised when
:meth:`derive_into`
Copy link
Member

Choose a reason for hiding this comment

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

same

));
}

let prk = self._extract(py, key_material)?;
Copy link
Member

Choose a reason for hiding this comment

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

Does it undermind the point at all that we still end up with the prk in some buffer that the caller doesn't control?

Copy link
Member Author

Choose a reason for hiding this comment

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

Sort of? It's not ideal. We could require that the buffer provided be >= underlying HMAC output size, but wow that sounds confusing.

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants