X-Ray Eyes in Cybersecurity
As a child, didn’t you want X-ray glasses? Just imagine being able to see though walls. Well, in cybersecurity, sometimes you need X-ray eyes, especially when looking at the details of our digital artefacts. So, let’s do a bit of delving into the formation of public key pairs and digital certificates. And, for me, cybersecurity is most interesting when we get down to the bits and bytes, and try to understand how all the elements fit together, and in how they are created.
Note, in this article, I will use the wonderful xxd program, and where “xxd -plain” converts from byte values into a hex string. We normally use hex strings to be able to view and edit binary values.
PEM and DER
One of the great things about cryptography is the way we have managed to migrate our methods. This migration is often required when we introduce new methods (such as with ECC) or where methods are deprecated (such as for DES). We thus have ways to define new methods and which can be easily interpreted by applications. At the core of this is the DER format for defining our cryptography.
We need ways to distribute our public keys, private keys and digital certificates in a portable format. One of the most common forms is Distinguished Encoding Rules (DER) encoding of ASN.1 (Abstract Syntax Notation One). Overall it is a truly binary…