Skip to content

Added EVP_KDF object - #8808

Closed
slontis wants to merge 7 commits into
openssl:masterfrom
slontis:kdf_meth
Closed

slontis wants to merge 7 commits into
openssl:masterfrom
slontis:kdf_meth

Conversation

@slontis

@slontis slontis commented Apr 22, 2019

Copy link
Copy Markdown
Member

This replaces EVP_KDF_METHOD with EVP_KDF and makes the interfaces more consistent with the EVP_MAC interfaces.

This may not need to be backported to 1.1.0 if the new_id is sufficent. This change should hopefully make it easier to incorporate into the new provider objects.

Checklist
  • documentation is added or updated
  • tests are added or updated

@slontis slontis mentioned this pull request Apr 22, 2019
2 tasks done
Comment thread crypto/evp/evp_locl.h Resolved
@slontis

slontis commented Apr 23, 2019

Copy link
Copy Markdown
Member Author

ping

@levitte levitte left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Other than a few nits, I'm happy with what I see

Comment thread test/evp_kdf_test.c Resolved
Comment thread test/evp_kdf_test.c Resolved
@slontis

slontis commented May 2, 2019

Copy link
Copy Markdown
Member Author

ping

@levitte levitte added branch: master Applies to master branch approval: review pending This pull request needs review by a committer labels May 2, 2019
Comment thread crypto/evp/names.c Resolved
Comment thread crypto/evp/names.c Outdated
dc->fn((const EVP_KDF *)nm->data, nm->name, NULL, dc->arg);
}

void EVP_KDF_do_all(void (*fn)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why do we need this function? It doesn't seem to be called by anything and isn't tested or documented.

Comment thread crypto/evp/names.c Resolved
Comment thread crypto/evp/names.c Resolved
@slontis

slontis commented May 3, 2019

Copy link
Copy Markdown
Member Author

hi @mattcaswell - the point of this PR was to make it resemble the EVP_MAC interface as closely as possible. The 'why do we need this?' questions need to also be addressed for the MAC case that this emulates.

@mattcaswell

Copy link
Copy Markdown
Member

The 'why do we need this?' questions need to also be addressed for the MAC case that this emulates.

Yes I agree with that. If the answer is "we don't need these things" then lets not add them here and instead have a PR to remove them from MAC.

@slontis

slontis commented May 3, 2019 •

Copy link
Copy Markdown
Member Author

Yes I agree with that. If the answer is "we don't need these things" then lets not add them here and instead have a PR to remove them from MAC.

The do functions can be removed - I am more reluctant to remove the getbyname and addkdf until a suitable replacement is implemented in the providers.

@mattcaswell

Copy link
Copy Markdown
Member

I am more reluctant to remove the getbyname and addkdf

Ok - well at least add a TODO(3.0) comment to prompt us to consider whether we need these functions in the presence of explicit fetch.

@levitte

levitte commented May 3, 2019

Copy link
Copy Markdown
Member

The functions you discuss are inspired from the corresponding for ciphers and digests. They are basically direct copies.

@mattcaswell

Copy link
Copy Markdown
Member

The functions you discuss are inspired from the corresponding for ciphers and digests. They are basically direct copies.

Yes I know. That doesn't automatically imply we should add equivalent functions for KDF if they are superseded by other calls.

@levitte

levitte commented May 3, 2019

Copy link
Copy Markdown
Member

Well, considering these APIs are new and unreleased, we can remove all that cruft when moving them to be provider provided. So maybe that's the right thing to do, to work on that directly instead of perfecting a legacy implementation.

@levitte

levitte commented May 3, 2019

Copy link
Copy Markdown
Member

With "these", I mean both EVP_MAC and EVP_KDF

@slontis

slontis commented May 3, 2019

Copy link
Copy Markdown
Member Author

I was just trying to get them in a similiar starting state - so they should both be fairly easy to change to providers.

@slontis

slontis commented May 3, 2019

Copy link
Copy Markdown
Member Author

Added TODO(3.0) comments. Removed do_all methods.

@mattcaswell mattcaswell left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@levitte please reconfirm

@levitte levitte added approval: done This pull request has the required number of approvals and removed approval: review pending This pull request needs review by a committer labels May 3, 2019
@levitte

levitte commented May 3, 2019

Copy link
Copy Markdown
Member

Merged.

ff8029c Added generated files for EVP_KDF changes
d2ba812 Added EVP_KDF (similiar to the EVP_MAC)

@levitte levitte closed this May 3, 2019
levitte pushed a commit that referenced this pull request May 3, 2019
Reviewed-by: Matt Caswell <[email protected]>
Reviewed-by: Richard Levitte <[email protected]>
(Merged from #8808)
levitte pushed a commit that referenced this pull request May 3, 2019
Reviewed-by: Matt Caswell <[email protected]>
Reviewed-by: Richard Levitte <[email protected]>
(Merged from #8808)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approval: done This pull request has the required number of approvals branch: master Applies to master branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants