Search code examples
javascriptsecurityencryptionpublic-key-encryptionencryption-asymmetric

Does anyone recognise this kind of public key?


For an application I want to write, the webservice gives me this public key, with which I have to encrypt the password for signing in. But I don't know what kind of encryption this might be. Is this recognisable? Is it possible to tell what this is or do I have to find it out my own by sniffing into the JavaScript (of the web GUI) which handles this key?

Here it is:

-----BEGIN PUBLIC KEY-----
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDN+SsAsYvIstaZ\/SYUNv7wvr+a
Ajkc28XxuKWpCbqFQS+EWeYpbuBB88iJU98yFjsFMh5BLbXhEX+2JmrC0DWd6o3r
1ILhNL27KmXo6Dh+2y0b9l3YXtmwiA1ThZEQun4Z1rUBPMF43DF805keLIsASFpj
nzc6zWw+jYCX7PTasQIDAQAB
-----END PUBLIC KEY-----

The fact that there is PUBLIC KEY, indicates this is asymmetric encryption. But there are lots of it. Here is a list, taken from Wikipedia of asymmetric encryption methods:

Benaloh · Blum–Goldwasser · Cayley–Purser · CEILIDH · Cramer–Shoup · Damgård–Jurik · DH · DSA · EPOC · ECDH · ECDSA · EKE · ElGamal (encryption · signature scheme) · GMR · Goldwasser–Micali · HFE · IES · Lamport · McEliece · Merkle–Hellman · MQV · Naccache–Stern · NTRUEncrypt · NTRUSign · Paillier · Rabin · RSA · Okamoto–Uchiyama · Schnorr · Schmidt–Samoa · SPEKE · SRP · STS · Three-pass protocol · XTR

RSA is the only one I know by it's name. Is that the most common one?

Thanks you very much for the help.


Solution

  • It's a 1024-bit RSA public key in PEM format with one character mangled in the first line:

    Public-Key: (1024 bit)
    Modulus:
     00:cd:f9:2b:00:b1:8b:c8:b2:d6:99:fd:26:14:36:
     fe:f0:be:bf:9a:02:39:1c:db:c5:f1:b8:a5:a9:09:
     ba:85:41:2f:84:59:e6:29:6e:e0:41:f3:c8:89:53:
     df:32:16:3b:05:32:1e:41:2d:b5:e1:11:7f:b6:26:
     6a:c2:d0:35:9d:ea:8d:eb:d4:82:e1:34:bd:bb:2a:
     65:e8:e8:38:7e:db:2d:1b:f6:5d:d8:5e:d9:b0:88:
     0d:53:85:91:10:ba:7e:19:d6:b5:01:3c:c1:78:dc:
     31:7c:d3:99:1e:2c:8b:00:48:5a:63:9f:37:3a:cd:
     6c:3e:8d:80:97:ec:f4:da:b1
    Exponent: 65537 (0x10001)