Will a post-quantum signature fit in your token?

Suppose your application gives a signed token 4,096 characters in a session cookie. You’re considering ML-DSA-65 for its signature. Will the token still fit? Our new post-quantum size calculator can answer that question before you generate a key or change a line of code.

A compact signed JWT has three parts: header.payload.signature. The signature travels as unpadded Base64url. An ML-DSA-65 signature is 3,309 bytes in binary, but its encoded form takes 4,412 characters. Even an empty payload couldn’t bring the token under your limit. The signature alone is 316 characters over.

What if your protocol allows ML-DSA-44? Its encoded signature takes 3,227 characters. After the two periods, that leaves 867 characters for the encoded header and payload together. Now you have a concrete test: measure those two parts of a representative token and see whether they fit. This calculation uses the space your application reserves for the token value. The cookie name and any other cookies sent on the request also count toward the HTTP header size.

If the browser only needs an identifier, keeping the session on the server is another option. Our guide to cookies and browser storage explains that design. For a protocol that requires the signed token itself, the calculator lets you compare the available parameter sets against your field limit using just their names and sizes.

Premium is coming soon

An optional premium subscription to remove ads is planned. Subscriptions are not available yet.

You can keep using our free tools without an account.