redbean: Add LuaCrypto compatible functions (plus some auxiliary functions)#1422
Open
mterron wants to merge 18 commits intojart:masterfrom
Open
redbean: Add LuaCrypto compatible functions (plus some auxiliary functions)#1422mterron wants to merge 18 commits intojart:masterfrom
mterron wants to merge 18 commits intojart:masterfrom
Conversation
pkulchenko
reviewed
Jun 2, 2025
Collaborator
pkulchenko
left a comment
There was a problem hiding this comment.
Thank you for submitting this; looks great! Couple of suggestions on the API:
- I'd consider the following renaming for consistency:
csrGeneratetogenerateCsr(orcreateCsr),generatekeypairtogenerateKeyPairandPemToJwktoconvertPemToJwk. - I wonder if
generatekeypaircan make its first parameter optional. I'd still allow it to be passed, but given that RSA has an optional integer parameter, if nothing is passed or an integer is passed, I'd run RSA key pair generation. - why is luaopen_lcrypto there if it doesn't seem to be defined/used?
pkulchenko
approved these changes
Jun 2, 2025
Collaborator
pkulchenko
left a comment
There was a problem hiding this comment.
Looks good to me. Thanks!
@jart, does the API look good to you?
… GCM) Improve test coverage
Cleanup language on the test file
Add definitions Align function name
The options are now passed in a table instead of positional parameters. This is not LuaCrypto compatible but it is a nicer interface.
pkulchenko
approved these changes
Jun 5, 2025
Collaborator
pkulchenko
left a comment
There was a problem hiding this comment.
Had a chance to review added methods and updated API. Looks good to me. Thanks!
Add correct jwltopem and pemtojwk function Expand tests
Contributor
|
Awesome ! |
Improve error messages Improve parameter validation Correct base64url encoding for JWK Add support for optional claims to convertPemToJwk Expand test coverage Add basic definitions
Collaborator
|
@mterron, thank you for the updates! I liked added error checking and new functions! Noticed a couple of things to check on (couldn't leave comments on individual lines for some reason, so summarizing it here):
|
Improve JWK functions Enable PKCS1 v2.1 support in MBEDTLS
pkulchenko
approved these changes
Oct 10, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements part of Issue #1136