Skip to content

GcmParams and extend KeyEncryptionAlgorithm with EC derive schemas from CMS - #296

Open
msetina wants to merge 3 commits into
wbond:masterfrom
msetina:master
Open

GcmParams and extend KeyEncryptionAlgorithm with EC derive schemas from CMS#296
msetina wants to merge 3 commits into
wbond:masterfrom
msetina:master

Conversation

@msetina

@msetina msetina commented Aug 11, 2025

Copy link
Copy Markdown

Implementing encrypted messages with CMS I noticed that the schemas for wrapping keys with EC key derive. Also the encryption/wrap could not be described when using GCM mode. Both are implemented with tests from RFC 5753 example byte values.

@msetina

msetina commented Aug 11, 2025

Copy link
Copy Markdown
Author

Extensions for #293

@msetina

msetina commented Aug 11, 2025

Copy link
Copy Markdown
Author

Helps with support for #278

@msetina

msetina commented Nov 27, 2025

Copy link
Copy Markdown
Author

Is there a chance that this moves on? It would be a shame to move it to my project.
@MatthiasValvekens What is your experience?

@MatthiasValvekens

Copy link
Copy Markdown
Contributor

I don't have merge access on this repository, and as far as I know @wbond is the only person who can cut releases, so I can't help you directly.

I've also resorted to registering mappings at runtime in asn1crypto for a number of things (and that includes some niche pyHanko features). So far the burden of maintaining those live patches is less than the effort it'd take to maintain a fork of this lib. Not exactly ideal, but it's the least bad option for me currently 🤷‍♂️ .

@wbond wbond left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thanks for taking the time to work on this.

If you rebase on master you should get working CI again.

Comment thread asn1crypto/cms.py
'2.16.840.1.101.3.4.1.28': 'aes192_wrap_pad',
'2.16.840.1.101.3.4.1.45': 'aes256_wrap',
'2.16.840.1.101.3.4.1.48': 'aes256_wrap_pad',
'1.3.133.16.840.63.0.2':'dhSinglePass_stdDH_sha1kdf_scheme',

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Do you have the URL for an RFC where these are defined? Would be good to add as a comment here.

Comment thread asn1crypto/cms.py
Comment on lines +702 to +716
'dhSinglePass_stdDH_sha1kdf_scheme':'1.3.133.16.840.63.0.2',
'dhSinglePass_stdDH_sha224kdf_scheme':'1.3.132.1.11.0',
'dhSinglePass_stdDH_sha256kdf_scheme':'1.3.132.1.11.1',
'dhSinglePass_stdDH_sha384kdf_scheme':'1.3.132.1.11.2',
'dhSinglePass_stdDH_sha512kdf_scheme':'1.3.132.1.11.3',
'dhSinglePass_cofactorDH_sha1kdf_scheme':'1.3.133.16.840.63.0.3',
'dhSinglePass_cofactorDH_sha224kdf_scheme':'1.3.132.1.14.0',
'dhSinglePass_cofactorDH_sha256kdf_scheme':'1.3.132.1.14.1',
'dhSinglePass_cofactorDH_sha384kdf_scheme':'1.3.132.1.14.2',
'dhSinglePass_cofactorDH_sha512kdf_scheme':'1.3.132.1.14.3',
'mqvSinglePass_sha1kdf_scheme':'1.3.133.16.840.63.0.16',
'mqvSinglePass_sha224kdf_scheme':'1.3.132.1.15.0',
'mqvSinglePass_sha256kdf_scheme':'1.3.132.1.15.1',
'mqvSinglePass_sha384kdf_scheme':'1.3.132.1.15.2',
'mqvSinglePass_sha512kdf_scheme':'1.3.132.1.15.3',

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Everywhere else in the codebase we use all lowercase under_score notation. Could we switch to that style for consistency?

From a specificity perspective, do we need _scheme at the end of each?

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.

3 participants