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

KBS: use RSA-OAEP alg for JWE symkey encryption #623

Conversation

mkulke
Copy link
Contributor

@mkulke mkulke commented Dec 12, 2024

draft, since it depends on #597

The usage of RSA1_5 is deprecated:

https://www.ietf.org/archive/id/draft-madden-jose-deprecate-none-rsa15-00.html#section-1.2

We can switch to RSA-OAEP by using the padding in the openssl rsa impl. Once we switched to this implementation we need a small change on guest-components side to set the same alg.

Xynnn007 and others added 3 commits December 12, 2024 17:14
Fixes confidential-containers#583.

Due to RFC 7516, the JWE AEAD Auth Tag should be expcilitly be included
inside the `tag` part. Before this commit, the tag is actually included
as the suffix of the `ciphertext`.

We fix this by expcilitly extract the tag and include it into the jwe
body.

Also, we fix the AAD calculation logic, s.t. derived from
ProtectedHeader which is also specifiled by RFC7516. This should be
align with the guest-components side.

This change will make the kbs_client not able to connect to the KBS.
Thus we update the KBS protocol version from 0.1.1 to 0.2.0.

Signed-off-by: Xynnn007 <[email protected]>
The usage of RSA1_5 is deprecated:

https://www.ietf.org/archive/id/draft-madden-jose-deprecate-none-rsa15-00.html#section-1.2

We can switch to RSA-OAEP by using the padding in the openssl rsa impl.

Signed-off-by: Magnus Kulke <[email protected]>
@Xynnn007
Copy link
Member

FYI, I have added the RSA-OAEP in this commit also.

@mkulke mkulke closed this Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants