You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gnarea
changed the title
Processing large RAMF payloads takes too long and requires too much memory
Signing large RAMF payloads takes too long and requires too much memory
Mar 22, 2020
This issue is back in the JS implementation, although I think it's for a different reason: The original problem was that we were using a slow WebCrypto implementation (for RSA-PSS+SHA-256 at least), but now the problem seems to be the ASN.1 DER serialisation... So we must absolutely detach the plaintext. (Something must've changed in asn1js or PKI.js)
This is how long it's taking to process an 8 MiB RAMF message with the JS implementation on my computer (which is quite powerful):
Generation: 13319 ms, of which 13252 ms correspond to SignedData.sign().
Consumption: 3064 ms, of which 3018 ms correspond to SignedData.verify().
Serialising payloads of up to 8 MiB takes too long in the JS library and results in heap space issues on the JVM.
Those issues go away when the content is detached, so we should detach it. This regression was introduced in #52.
This is just a tactical change for the signature of large payloads. Encrypting such payloads remains an issue and it's tracked on #14.
The text was updated successfully, but these errors were encountered: