Questions tagged [pem]

PEM, (from Privacy Enhanced Mail standard) is a base64 container format for encoding keys and certificates.

PEM (Privacy Enhanced Mail standard) is a base64 container format that encodes keys and certificates surrounded by header lines, and is used extensively by . It is defined in RFC standards 1421-1424

1003 questions
26
votes
3 answers

How to convert PKCS#8-formatted PEM private key to the traditional format?

From OpenSSL 1.0 change log: Make PKCS#8 the default write format for private keys, replacing the traditional format. This form is standardised, more secure and doesn't include an implicit MD5 dependency. [Steve…
rkellerm
  • 5,362
  • 8
  • 58
  • 95
26
votes
2 answers

C# RSA Public Key Output Not Correct

I am currently trying to generate and send a public RSA key using C#. It should be a 2048 bit long key in PEM format. I have successfully done so using OpenSSL command with the following (some output are shortened): $ openssl genrsa 2048 Generating…
Pettor
  • 491
  • 2
  • 6
  • 16
25
votes
4 answers

Export private/public keys from X509 certificate to PEM

is there any convenient way to export private/public keys from .p12 certificate in PEM format using .NET Core? Without manipulating with bytes at low level? I googled for hours and almost nothing is usable in .net core or it isn't documented…
rudolfdobias
  • 1,778
  • 3
  • 17
  • 40
24
votes
3 answers

How to check a public RSA key file

Inside a shell script I want verify public RSA file. All I want to do is that find a way to check this file is a genuine public key file, nothing else. Can I ask experts here what are the ways I can verify this input file to check this is a genuine…
csf
  • 529
  • 1
  • 4
  • 16
24
votes
2 answers

How to convert certificate from PEM to JKS?

I have to convert a certificate in PEM format into an Java key store. To use this one with tomcat at a windows server I've got those files: cert_request.csr -----BEGIN CERTIFICATE REQUEST----- ... -----END CERTIFICATE…
Narf
  • 243
  • 1
  • 2
  • 7
23
votes
3 answers

How can I get SecKeyRef from DER/PEM file

I need to integrate my iPhone app with a system, and they require to encrypt data by a given public key, there are 3 files in 3 different format .xml .der and .pem, I have researched and found some articles about getting SecKeyRef from DER/PEM, but…
Son Nguyen
  • 3,481
  • 4
  • 33
  • 47
21
votes
5 answers

Convert SSL .pem to .p12 with or without OpenSSL

I get external .pem files that need to be converted to .p12 files - I add a username and password in the process. (I need to do this to utilize a third party API.) Using openssl, the command is... openssl pkcs12 -export -in xxxx.pem -inkey…
DrDave
  • 718
  • 1
  • 7
  • 16
21
votes
3 answers

How to read an RSA key from file

I need to read in an RSA private key from a file to sign a JWT. I have found some examples on how to save a generated RSA key to disk but nothing showing how to build a key struct based on a pre-generated key from a file. The key is generated like…
Ed S.
  • 221
  • 1
  • 2
  • 5
21
votes
6 answers

chmod unable to change permissions

I'm facing an annoying problem. It's been pretty frustrating. I am using a computer at my school to work on the Coursera Startup class. I am trying to connect to an Amazon EC2 instance. I downloaded the key pair. I check…
Rohit
  • 3,087
  • 3
  • 20
  • 29
20
votes
2 answers

How to convert PEM file to PPK using PuTTYgen in Ubuntu

I have created an EC2 instance on AWS. I want to connect to the instance using PuTTY, but it requires PPK file. I have PEM file which I want to covert into PPK using PuTTYgen. How do I use PuTTYgen on Ubuntu to convert PEM file to PPK?
Sumit Patil
  • 556
  • 1
  • 5
  • 19
20
votes
1 answer

What is a .pem file and How to use it?

I am designing a new chrome extension and when I package it then I get 2 file: a .crx file and a .pem file. I want to distribuite my extension on my server ( shared ) and on Chrome webstore. Could you tell me what is a pem file and how to use it ? I…
xRobot
  • 25,579
  • 69
  • 184
  • 304
19
votes
5 answers

How to load a public RSA key into Python-RSA from a file?

I generated a private and a public key using OpenSSL with the following commands: openssl genrsa -out private_key.pem 512 openssl rsa -in private_key.pem -pubout -out public_key.pem I then tried to load them with a python script using…
Amine Kerkeni
  • 914
  • 3
  • 14
  • 29
19
votes
3 answers

Creating RSA Private Key from PFX (PKCS #12) file

I'm trying to get a private RSA key from a pkcs #12 file. I've tried running the standard openssl pkcs12 -nocerts -out priv.pem -in domain.com.pfx However this results in a key file like the one below: Bag Attributes Microsoft Local Key set:
Dorana
  • 311
  • 1
  • 4
  • 12
18
votes
2 answers

Create X509Certificate2 from PEM file in .NET Core

I want to create a X509Certificate2 object based on a PEM file. The problem is setting the PrivateKey property of X509Certificate2. I read X509Certificate2.CreateFromCertFile() on .NET Core and then used var rsa = new…
heydy
  • 273
  • 2
  • 3
  • 10
18
votes
3 answers

Correctly create RSACryptoServiceProvider from public key

I'm currently trying to create an RSACryptoServiceProvider object solely from a decoded PEM file. After several days of searching, I did manage to wrangle a working solution but it's not one that would be production ready. In a nutshell, in order to…
DiskJunky
  • 4,750
  • 3
  • 37
  • 66
1 2
3
66 67