Improved pkcs8 support #404
No reviewers
Labels
No labels
bug
duplicate
enhancement
feature
help wanted
improve API
invalid
needs documentation
not-planned
rtfm
stale
support
wishlist
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-libtom/libtomcrypt!404
Loading…
Reference in a new issue
No description provided.
Delete branch "pr/pkcs8-improved"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This is a re-created #403 which got closed and for some mysterious reasons cannot be re-opened. We should share the new ECC+pcks8 with RSA as the old
rsa_import_pkcs8does not support password protected keys.When factoring-out the relevant pkcs#8 parts into an own module, I'll put it in
src/pk/asn1/pkcs8? or do you think it should go somewhere else?I am also not sure, perhaps
@sjaeckel do you have any plans with your ideas from
refactor/pr/pkcs8-improved(in libtomcrypt_p)?I'm working on it ;)
I've force-pushed
pr/pkcs8-improvedand createdpr/pkcs8-improved-originalwhich points to your original latest versionso either we disable the PKCS#8 API's in the
LTC_EASYbuild or we'd need the entire chain PKCS#8+PBES+PKCS#5+PKCS#12+PADDING ... what do you think?... I just realized that all the PKCS options are enabled anyways for
LTC_EASY... so it'd be only the PADDINGAdding
PADDINGtoLTC_EASYis IMO ok.clang-tidy:
fixed locally, waiting for more review!?
It looks good, but while testing with my perl test suit (which passed all pkcs8 EC/RSA tests) it turned out that the latest ECDSA changes broke some wycheproof tests - now I am trying to fix them.
Okay, then I'll force-push so you can base your changes on top of that (if there are some to come)
btw @rmw42 you're also welcome to review if you feel like it :)
Do you probably have the time to create the missing test-vectors for pbes1 (sha1 with 3des), pbes2 (RC2 with weird key sizes) and encrypted cases for rsa?
Cheers! Not sure I'd even know where to start - haven't had any dealings with PKCS#8 ^_^;;
neither did I of your SSH stuff ;)
...also I meant more in regards to the code or obvious bugs, not functionality
[edit] and no worries if you don't review, your contributions are already more than enough!
I'll do it over the weekend.
RSA + encrypted pkcs8 tests added
awesome, thanks :)
also especially for the docs!
I think it is ready for rebase & merge (after merging #438)
Do we have to wait for #438 or can I also merge now?
I just created testvectors for PBES2 RC2-40 and RC2-64 and they can't be handled... dunno yet why :(
rc2_keys.zip
Looks like we can load a key created like this:
But cannot load a key created like this:
It looks link we incorrectly handle
hmacWithSHA256as inpbes_decryptthere isarg->type.h = sha1got it! PBKDF2-params is specified in rfc2898 as follows and we didn't handle the optional keyLength...