josekit-rs icon indicating copy to clipboard operation
josekit-rs copied to clipboard

Support for Brainpool curves

Open FlixCoder opened this issue 1 year ago • 2 comments

Hi!

I know the Brainpool curves are not part of the official JOSE specification, but we need to use them due to German regulations. Would you be up to accept added Brainpool curves to the library?

Openssl already supports them, so the changes are small: https://github.com/hidekatsu-izuno/josekit-rs/compare/master...famedly:josekit-rs:flix/bp256r1

FlixCoder avatar Jan 10 '24 09:01 FlixCoder

Hi. @FlixCoder.

I understand your wish but it is difficult to support the Brainpool curves because it is not standard. Supporting unnecessary algorithms may lead to security risks and future incompatibilities. Could you first tell me about German regulations. Where is the document about it ?

If there is official spec, We supports the algorithm.

hidekatsu-izuno avatar Jan 10 '24 22:01 hidekatsu-izuno

For the Brainpool curves on their own, there is https://datatracker.ietf.org/doc/html/rfc5639

I do not find any document specifying the use of the Brainpool curves in JWS.

There are however specifications (often in German) that mandate the use of Brainpool:

  • Cryptography in healthcare infrastructure: https://fachportal.gematik.de/fachportal-import/files/gemSpec_Krypt_V2.25.0.pdf
  • https://fachportal.gematik.de/fachportal-import/files/gemSpec_TI-Messenger-FD_V1.1.1.pdf with example of BP256R1 in a JWT in 5.1.1.1.2.1; English translation: https://fachportal.gematik.de/fileadmin/Fachportal/Anwendungen/TI-Messenger/Spezification_TI_Messenger_Specialist_Service-R1.1.1_EN.pdf here the example is in 5.1.1.1.3

FlixCoder avatar Jan 11 '24 09:01 FlixCoder