[gnutls-devel] GnuTLS | Draft: Work on issue #1475 (!1812)

Read-only notification of GnuTLS library development activities gnutls-devel at lists.gnutls.org
Sun Feb 18 07:02:56 CET 2024




Hoang Long commented: https://gitlab.com/gnutls/gnutls/-/merge_requests/1812#note_1778070588

@dueno While implementing the ECDH test vector, I encountered an issue as I couldn't find any public function in GnuTLS to parse ASN.1 encoded public keys from the test vector. For instance, in the ecdh_secp256r1_test.json, the test with tcId 1 has a public key encoded as 3059301306072a8648ce3d020106082a8648ce3d0301070342000462d5bd3372af75fe85a040715d0f502428e07046868b0bfdfa61d731afe44f26ac333a93a9e70a81cd5a95b5bf8d13990eb741c8c38872b4a07d275a014e30cf. Currently, I'm temporarily converting it to 04410462d5bd3372af75fe85a040715d0f502428e07046868b0bfdfa61d731afe44f26ac333a93a9e70a81cd5a95b5bf8d13990eb741c8c38872b4a07d275a014e30cf to use gnutls_pubkey_import_ecc_x962 with ECParameters fixed in secp256r1. But I'm afraid tampering with ASN.1 encoded of public key could harm affect the correctness of bug types like "InvalidAsn" defined in the test vector. Should I extract the public key information from the test vector and parse it into the correct ASN.1 encoding that the GnuTLS library accepts?

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1812#note_1778070588
You're receiving this email because of your account on gitlab.com.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20240218/b433d621/attachment.html>


More information about the Gnutls-devel mailing list