3 ms·
`MII` for RSA private keys.
by mmastrac 1y ago
`MII` for RSA private keys.
- Muromec 1y agoMII is not RSA, it's an opening header of asn1 structure encoded to DER -- 30 82 0x which is basically "{" when which can be pretty much anything from x509 certificate to private keys fro ECDSA. Actual RSA oid is somewhere in the middle.
- mmastrac 1y agoTrue, but for the most part, RSA keys are the only keys that anyone encounters that start with long SEQUENCEs requiring two-byte lengths. `eY` could be any JSON, but it's most likely going to be a JWT. Neither is a perfect signal, but contextually is more likely correct than not.
- Muromec 1y agoThat depends on the kind of abyss you are staring into. Mine had plenty of non-RSA keys, certificates (which are of course two-byte length all the time) and CMS containers.