Signing
With a key pair loaded or generated in the browser, the tool hashes the document using SHA-256, SHA-384, or SHA-512, then builds the PSS encoding: a block containing the hash and a random salt, expanded with the MGF1 mask generation function. The encoded block is raised to the private exponent modulo the modulus, yielding a signature exactly the key size in bytes: 256 for RSA-2048, 384 for RSA-3072, 512 for RSA-4096.