Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Botan 3.0: Cannot create custom sub-classes of Botan::Private_Key #3878

Closed
reneme opened this issue Jan 8, 2024 · 3 comments
Closed

Botan 3.0: Cannot create custom sub-classes of Botan::Private_Key #3878

reneme opened this issue Jan 8, 2024 · 3 comments
Assignees
Labels

Comments

@reneme
Copy link
Collaborator

reneme commented Jan 8, 2024

With a55e4b2 the pk_ops.h header became private, only the pk_ops_fwd.h header stayed public. That's not enough to create custom sub-classes of Botan::PK_Ops::* and prevents downstream applications from implementing their own public-key algorithms.

For instance, applications might want to do that to offload public-key crypto to custom hardware. Another use case is implementing custom hybrid schemes; e.g., combine a classical with a PQC algorithm.

This may become a showstopper for some applications migrating from Botan 2.x to 3.x. I'm assuming that preventing applications from doing that wasn't intentional, @randombit? The obvious fix is to promote pk_ops.h to a public header and write a dedicated example applications demonstrating a custom public-key algorithm, as a sort-of regression test.

This is closely related to #3867.

@securitykernel
Copy link
Collaborator

securitykernel commented Jan 9, 2024

This is IMHO really a crucial feature and I think what partially led to the current regression is that we (1) failed to document it properly and (2) are missing tests for it. A good place for tests may be examples?

reneme added a commit to Rohde-Schwarz/botan that referenced this issue Jan 9, 2024
They used to be public in Botan 2.x but were removed from the public
interface. Though, those headers are needed by applications that wish
to implement custom public-key algorithms.

Closes randombit#3878
@reneme
Copy link
Collaborator Author

reneme commented Jan 9, 2024

I do think that a comprehensive example (as proposed in #3879) is the best way to "regression test" this.

On that note: Currently, the build system (read: make examples) does not prevent us from including internal headers in example files. We should find a way to fix this.

reneme added a commit to Rohde-Schwarz/botan that referenced this issue Jan 9, 2024
They used to be public in Botan 2.x but were removed from the public
interface. Though, those headers are needed by applications that wish
to implement custom public-key algorithms.

Closes randombit#3878
reneme added a commit to Rohde-Schwarz/botan that referenced this issue Jan 9, 2024
They used to be public in Botan 2.x but were removed from the public
interface. Though, those headers are needed by applications that wish
to implement custom public-key algorithms.

Closes randombit#3878
@reneme
Copy link
Collaborator Author

reneme commented Jan 9, 2024

Currently, the build system does not prevent us from including internal headers in example files.

See: #3880

reneme added a commit to Rohde-Schwarz/botan that referenced this issue Jan 10, 2024
It used to be public in Botan 2.x but was removed from the public
interface in Botan 3.x. Though, this header is needed by applications
that wish to implement custom public-key algorithms.

Closes randombit#3878
reneme added a commit to Rohde-Schwarz/botan that referenced this issue Jan 10, 2024
It used to be public in Botan 2.x but was removed from the public
interface in Botan 3.x. Though, this header is needed by applications
that wish to implement custom public-key algorithms.

Closes randombit#3878
reneme added a commit to Rohde-Schwarz/botan that referenced this issue Jan 10, 2024
It used to be public in Botan 2.x but was removed from the public
interface in Botan 3.x. Though, this header is needed by applications
that wish to implement custom public-key algorithms.

Closes randombit#3878
@reneme reneme closed this as completed in b38e50a Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants