Closed qadirsuh closed 6 years ago
You have a certificate and want to export the public key? Is this a one time operation or does it need to be automated?
Yes. want to export the public key. and its not the one time operation.
Actually I am following a documentation of loxone miniserver https://www.loxone.com/dede/wp-content/uploads/sites/2/2016/08/0903_Communicating-with-the-Miniserver.pdf
please see Page 5 of 21
and step number 2. i.e
- Acquire the Miniservers public key via “jdev/sys/getPublicKey” -> {publicKey} a. Store on the client b. Format: X.509 encoded key in ANS.1
Thanks for the clarification. As far as I can see the has nothing to do with elliptic curve key pairs (secp256r1). Instead it is all about AES and RSA. So it is out of scope for this repo.
When dealing with such keys I use to inspect them using tools like lapo.it. https://lapo.it/asn1js/#30819F300D06092A864886F70D010101050003818D00308189028181009B12271AA34276763328D50DC408EBA9AC8F977593C9D7735E632AF5B7F869D9515EF7448401DBFE2DA27A41C7DFABB11D2D45C255E91EBFBB41980CC4014E854D86E3AD651E5C5BECB2D5A5522F877C2A309910737A60B331EEE5CCC888678F454E556AC571E9D9059EBA69951E76692E7CD8488FDA408665F6F7F5E1C0CAC50203010001
Good luck! :) PM me if you want further assistance on an hourly fee.
Thanks for links :) BTW do you understanding the docs. points
- Generate a AES256 key -> {key} (Hex)
- Generate a random AES iv (16 byte) -> {iv} (Hex)
I am new to Encryption/Dycrptions and very new to AES. I am stuck on step 4 and 5. I have generated an AES key and AES iv and then converted it to (Hex) but I am not sure its correct or not. how to confirm this I have generated the correct keys. any free advice will be helpful :)
I would then try to encrypt some data and try to decrypt it using same iv and key in openssl terminal.
I need to export the public key as X.509 DER with proper ASN.1 header / structure
please give me an example.
I have a public key with format
How to convert this in X.509 DER with proper ASN.1 header / structure
any help will be appreciated. thanks