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
Generating a DER-encoded SignedData value with a content of 8 MiB takes 6-9 seconds on my computer, which could make the public gateway susceptible to severe availability issues.
Nearly all that time is spent serialising the ContentInfo/SignedData object to a DER ByteArray (constructing those objects and calling SignedData.sign() takes 60ms and 5ms, respectively). Roughly 66% of the serialisation time is spent encoding the SignedData value and the remainder serialising the ContentInfo wrapper.
Verifying such large values takes just over 300ms on the same computer after some optimisations.
The culprit has to be the ASN1.js and/or PKI.js libraries, although having the plaintext embedded in the CMS SignedData certainly doesn't help. So broadly speaking, our options are:
Locate the bottleneck in the 3rd party libraries and fix it.
gnarea
changed the title
Deserialising a message with a large payload can take seconds to complete
Serialising a SignedData value with a large, embedded content takes seconds to complete
Mar 22, 2020
Generating a DER-encoded SignedData value with a content of 8 MiB takes 6-9 seconds on my computer, which could make the public gateway susceptible to severe availability issues.
Nearly all that time is spent serialising the ContentInfo/SignedData object to a DER ByteArray (constructing those objects and calling
SignedData.sign()
takes 60ms and 5ms, respectively). Roughly 66% of the serialisation time is spent encoding theSignedData
value and the remainder serialising theContentInfo
wrapper.Verifying such large values takes just over 300ms on the same computer after some optimisations.
The culprit has to be the ASN1.js and/or PKI.js libraries, although having the plaintext embedded in the CMS SignedData certainly doesn't help. So broadly speaking, our options are:
The text was updated successfully, but these errors were encountered: