title: RSA public key size python
body: <p>I need help using RSA encryption and decryption in Python.
  I tried to generate a public key and a private key by using RSA 2048, then send the public key as hex to a destination. However, I faced a problem, the generated public key size is greater than 2048 bit. I used the following script. Could I know why the key size is greater than 2048 bit?</p>
  
  <pre><code>import Crypto
  from Crypto.PublicKey import RSA
  
  key = RSA.generate(2048)
  
  binPrivKey = key.exportKey('DER')
  binPubKey = key.publickey().exportKey('DER')
  
  print(binPubKey.encode('hex'))
  </code></pre>