Skip to content

Would you please provide some instructions about how to make Botan-2.x as backend crypto library? #372

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

Open
addsoa opened this issue Mar 3, 2025 · 1 comment
Labels

Comments

@addsoa
Copy link

addsoa commented Mar 3, 2025

What's your question?

Would you please provide some instructions about how to make Botan-2.x as backend crypto library?

Additional Context

I don't need ssl and I am not farmiliar to openssl. I choose Botan as it's moderner and it's easier to use. How can I integrate jwt with Botan-2.x? By the way, for json, I use boost.

I've gotten the knowledge that jwt is trait-based that it is expected that I can plugin Botan adapter as a trait. I've read traits in jwt-cpp/traits/ and they are all customized traits for json options. Then what's should I do for this problem: to implement a trait for algorithm/crypto and integrate it with json trait or to implement a trait for both json(by boost) and crypto(by Botan) customization? Would you please provide some examples or instructions on how to customize a crypto backend?

Thank you very much.

@addsoa addsoa added the question label Mar 3, 2025
@Thalhammer
Copy link
Owner

Hi addsoa,
I am happy for your interest in adding support for the Botan crypto library.
jwt-cpp is indeed trait based, however, as you have noted, this only applies to the json part.
Because there are so few crypto libraries in the wild and most of them provide some sort of wrapper for openssl's api I choose to not make this part based on templates.
I have never worked with Botan before, but I expect primitives like a RSA/ECDSA key type and basic signing/verification to be there. Integrating it into jwt-cpp would likely involve a fair amount of changes. Your main working area would be the algorithm namespace. jwt-cpp supports custom algorithms, so you can implement algorithms one by one using botan in your own code to test them out.

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