Score:-1

.pem file from a SHA256 hash

cn flag

Is it possible to generate a .pem file from a sha256 ?

As an example, I obtained the hash of a sha256 certificate, I don't have more information on it. Can I generate a certificate based on this hash in order to listen to the traffic using this certificate?

SAI Peregrinus avatar
si flag
PEM is just BASE-64 encoding ASN.1 encoded data, with a header & footer to tell what sort of data it is. See [RFC7468](https://www.rfc-editor.org/rfc/rfc7468). That said, SHA256 is a hash, while certificates bind public keys to identities, so there's no standard thing called a SHA256 certificate. Certificates are public, they'll never help you eavesdrop on encrypted traffic without the recipient trusting your certificate (and you having the associated private key).
dave_thompson_085 avatar
cn flag
In general for any X **you can't 'generate' X from any decent hash** of X, which SHA256 is -- that's called preimage resistance and is one main feature and purpose of secure hashing. However, nowadays many certificates _issued by public CAs_ are [logged for 'transparency'](https://en.wikipedia.org/wiki/Certificate_Transparency) and if yours is you can _find_ it using the hash at e.g. https://crt.sh . However, as @SAI says, having the cert won't allow you to sniff or intercept traffic.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.