Is the length of a DER-encoded RSAPublicKey (PKCS #1) for a 1024-bit RSA key pair consistent?
问题 I've created multiple 1024-bit DER-encoded RSAPublicKeys (PKCS #1) with the openssl command: openssl genrsa 1024 | openssl rsa -outform DER -RSAPublicKey_out -out pubkey.der So far, every public key file created like this has been exactly 140 bytes. Are 1024-bit RSA public keys encoded in this format always 140 bytes, or can this size vary? I've learned that the size of a DER encoded private key can vary. 回答1: It should always be 140 bytes for a 1024-bit key using an exponent value of F4