-1

I have a text that is supposedly base64 encoded. But when I try to decipher it, an incomprehensible text comes out. But in principle, Latin letters are read. Perhaps this is a public certificate.

How to decipher it. And is it possible to encrypt your certificate the same way?

VQQGEwJHQjEPMA0GA1UECBMGTG9uZG9uMQ8wDQYDVQQHEwZMb25kb24xEzARBgNV
BAoTClByaXZheCBMdGQxFDASBgNVBAsTC0hNQSBQcm8gVlBOMRYwFAYDVQQDEw1o
aWRlbXlhc3MuY29tMQwwCgYDVQQpEwNITUExHjAcBgkqhkiG9w0BCQEWD2luZm9A
cHJpdmF4LmNvbTAeFw0xNDA1MTMwNzQ1NThaFw0yNDA1MTAwNzQ1NThaMIGgMQsw
CQYDVQQGEwJHQjEPMA0GA1UECBMGTG9uZG9uMQ8wDQYDVQQHEwZMb25kb24xEzAR
BgNVBAoTClByaXZheCBMdGQxFDASBgNVBAsTC0hNQSBQcm8gVlBOMRYwFAYDVQQD
Ew1oaWRlbXlhc3MuY29tMQwwCgYDVQQpEwNITUExHjAcBgkqhkiG9w0BCQEWD2lu
Zm9AcHJpdmF4LmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMyQ
vosRoQjE/qNBzpVzU3Td0jS8z1h96BvqzNfVIK+yOuoe+/qv59q4Eo1R+kUnUlM9
KznYDmHxIBBID24Kak0nzBSLDHrK7RO70DYgj8jWteQYWk4G+Eu5kfO/ru6WYDcU
Wq1ifHDEKbAJ8t2SgneAVCYcqwBRPJqsqkkMnrgNxdPU9yMVX4gxRqVvD0KIYgwl
4te7aF2i3tElM8fDatTmWqeIgoU1kOEqaZFT5lzeZP7sh0Q5h0QAJOKYPs6qgCH4
zv+74DCCSSR5Oh6oF5ssCX4GADaWqVH+pdDudLo3wxu81PN2K95jk7r25Dung7F9
a65cp+b/okLmWwZoyeMCAwEAAaOCAQkwggEFMB0GA1UdDgQWBBQjV1wN2kwuVDRa
DQpk4p4HThtF4zCB1QYDVR0jBIHNMIHKgBQjV1wN2kwuVDRaDQpk4p4HThtF46GB
pqSBozCBoDELMAkGA1UEBhMCR0IxDzANBgNVBAgTBkxvbmRvbjEPMA0GA1UEBxMG
TG9uZG9uMRMwEQYDVQQKEwpQcml2YXggTHRkMRQwEgYDVQQLEwtITUEgUHJvIFZQ
TjEWMBQGA1UEAxMNaGlkZW15YXNzLmNvbTEMMAoGA1UEKRMDSE1BMR4wHAYJKoZI
hvcNAQkBFg9pbmZvQHByaXZheC5jb22CCQCGloifLb735DAMBgNVHRMEBTADAQH/
MA0GCSqGSIb3DQEBBQUAA4IBAQBtuQXAuxPkZH5hLUeK45dNHOj2TAtWs1WM+Kje
SBPfzn1RQE8xwClcBEdpfiUi4lZ1X9OIq3Jri0T27YAaUk3bMqvk6Pzmida96yWY
lxQjzitXsH7KyCCWmNBSIxF2M/sb2OX9vWdAINDawiFeEzNcqwx/LLyriZ+WxFyU
eWVPl6cUKQBNoDGXZdRKWePT+QNIrtLBHRhB+UpwtoXn6qVl3t8YbycgYczd6lBe
9GiAKvfqLuxkfDe9ZgLMKnQZfjfUyUPpYODOJSGewqiHOYAO4ix26heq3K6rFVpH
Y2MwKmFME0eL8tHlPAWEkGOICiuwX6ir0tPhhq4WAUY1K9kj```

I cannot publish the base64 decrypted format. StackExchange gives an error due to encoding
3
  • 2
    What exactly are you trying to do by deciphering the base64 string? – Ramhound May 3 at 22:00
  • Please just delete the question. There's history so no point "gibberishing" it. – Tom Yan May 4 at 0:13
  • If as per the answer, its a public key, there's no issue at all, If its something private, OP can flag the post, let us know what's the real issue, and we could possibly redact the key. – Journeyman Geek May 4 at 2:20
2

Yes, this is a base64-encoded ASN.1 public key certificate. You can use openssl to parse the text form:

openssl x509 -in certificate.pem -text

assuming it has the usual PEM "-----BEGIN CERTIFICATE-----" and "-----END CERTIFICATE-----" headers, although you can just add these to the top and bottom of what you've got and openssl will accept this. If not, you can still use openssl to read the binary version

openssl x509 -inform DER -in certificate.bin -text

In this case this certificate has subject "CN = Apple Server Authentication CA, OU = Certification Authority, O = Apple Inc., C = US" and usage "Certificate Sign, CRL Sign" so I'd guess it's an intermediate CA certificate.

And is it possible to encrypt your certificate the same way?

Yes this is PEM, the default format for certificates (and not actually encrypted). Pretty much all software will generate or export certificates in this format.

1
  • 1
    It's worth noting that some implementations may have problems with a .pem whose base64 data is not hard-wrapped at 64 columns, so it may be necessary to do that in addition to adding the header and footer. – Spiff May 3 at 22:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.