-
Notifications
You must be signed in to change notification settings - Fork 181
v6.1.0 computeSignature() causes DeprecationWarning #497
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
Comments
We are aware and welcome PRs to address this. |
@strawberrycz Have you tried using: https://nacl.cr.yp.to/box.html You shouldn't rely on xml-crypto for any security related stuff, you would be endangering your users. |
@ahacker1-securesaml , is it possible to provide a clear way to use NaCl Box for users. That link you sent doesn't have any instructions for use in a Node project. It also doesn't have directions on how to use it on Windows. If NaCl Box won't work for users of xml-crypto, and someone has to work with XML for project-specific reasons (SAML, SOAP, et.c), what alternative would you suggest? |
Google and ChatGPT is there to help. Many more secure ways of signing data then using xmlcrypto . Suppose a new attack comes out against rsa signatures, xml signatures libraries won't be able to mitigates it because don't have active maintainers. Better to switch now then later |
@ahacker1-securesaml FWIW this issues example code at description seems to/might be the case of signing Czechia flavour of electronic prescription which seems to be related cz's domestic and European Union's cross border (EU wide) electronic prespriction. I.e. possibility to exchange EU citizens' prescription from one country to another to get public health care services at EU area regardless of current location or something like that. Feed If you want to dig little bit further you might want to use your favourite search engine with search terms Point of this comment was that one can find e.g. healthcare, finance and corporate specs which use xml digital signatures for other purposes than SAML. E.g. digitalization of healthcare systems are slow from every possible aspect (specification phase and adaption of specifications) so unfortunately xml dsig usage is more like increasing in terms of systems which use it instead of fading away. This comment was also indirect response to comment #493 (comment) :
|
Yes there are legitimate cases outside of SAML, but I want to make the case that migrating away from XML Signatures is the best move for the smaller applications. First of all, signing XML using XML Signatures is basically useless, as you cannot guarantee that the receiving side will actually use the signed portions. Most clients will likely be vulnerable to either signature exclusion attack & signature wrapping attacks. Maybe we did secure xml-crypto verification, but all the other libraries are vulnerable. To mitigate the attacks is to used the signed portions i.e. for xml-crypto use getSignedReferences(). At that point if the client has to refactor their code logic to use the signed portions, then they might as well just migrate away from XML Signatures entirely. Furthermore, there isn't any active development on the XML Signature specification. There weren't any cryptographers to design the specification in the first place, and I doubt they will help out in the future. EU has already mandated migrating away from RSA and towards secure algorithms like ECC. Note that this library does not support ECC Migration to LibSodiumIt's simple: For HTTP Requests, sign the request body using libsodium/ECC crytography. For XML Documents/SOAP, libsodium returns a base64 encoded data:
Just embed it within the existing data: <Prescription>
libsodium: base64.signature
</Prescription> EU Regulatory problemsYou are correct EU is slow to adopt changes, so maybe libsodium isn't approved yet (despite it actually designed by crytographers). That is a problem with EU eIDAS standard. We shouldn't support/encourage XML signatures because some bureaucrat with no knowledge of cryptography mandates that usage. Furthermore, it seems like these eIDAS standards are not contributing to security. We should impose charges for legacy support for the insecure XML signing/verification, on bureaucracies like eIDAS. AND donate them to active cryptographic research. |
Issue Description
v6.0.1 is OK, but in v6.1.0 I am getting DeprecationWarning when computeSignature() is called.
Code Snippet
Additional Context
The text was updated successfully, but these errors were encountered: