An 8192 rsa key is 8192 bits, not bytes. That is 1024 bytes.
Encoding bytes in BASE64 increase its size in a factor of 4/3:
$ echo $((1024*8/6))
1365
Which is close to the size of the key inside the public key file.
$ awk '{print $2}' rsatest.pub | wc -c
1397
Of course, the "private key file" contains (at least):
- the value of m (public modulus)
- the value of e
- the value of d
- the value of p
- the value of q
And, in fact, it contains 8 (big and small) numbers:
cat rsatest | grep -v -- ----- | tr -d '\n' | base64 -d | openssl asn1parse -inform DER
That increase the size in a factor of at least 4, it contains 6363 bytes.
Some other way to look inside the private file is:
openssl rsa -text -in rsatest
Which shows that what the file contains are integers for
- modulus
- publicExponent
- privateExponent
- prime1
- prime2
- exponent1
- exponent2
- coefficient