Is Private key generate during CSR Creation for Signing Certificate? - private-key

I have created the CSR for my Signing Certificate. During CSR creation, the CSR file saved on my system. But i couldn't find where is the Private key file. I am following the below URL instruction to create CSR file. Anyone help me with these how to check and find Private key file.
https://in.godaddy.com/help/windows-generate-csr-for-code-or-driver-signing-certificate-7282
Thanks for your help.

In Windows the private key is generated when you use the snap-in to generate the CSR. The private key is stored (encrypted) at:
%APPDATA%\Microsoft\Crypto\RSA\Your SID
or
%APPDATA%\Microsoft\Crypto\Keys
If there are multiple files in that folder, look for one with a date and time close to when you generated your CSR.

Related

How to generate private key in live environment

In yodlee deveopment environment, I can't see the private key I need to signed the generated jwt, i see the private key in sandbox, but can't see it in development
Someway I have a private key that isn't working (can't remember how i have this private key, as this is a development that i started time ago, and it stop and now i'm getting it again)
In the yodlee sandbox, you are issued your RSA keypair. This is to speed things along for you.
Once you get out of the sandbox environment, you need to generate your own RSA key pair, and upload your public key with Yodlee while keeping your private key secure, confidential, secret, and not in any mobile devices.
Google "How do I generate an RSA keypair" for info on the command line tools and other sources.

How do I encrypt an email using a Yubikey?

I am fairly new to PGP encryption. I generated a new key pair last week on a Yubikey, while previously I had only used a private key that I generated on my machine. I use thunderbird enigmail for key management. This is probably a stupid question but I don't actually understand how to encrypt an email using the private key stored on my Yubikey. I can decrypt just fine but can't figure out how to compose an encrypted email from the new key. Using my old key pair, it's automatic - how do I actually encrypt using the right private key? At what point do I enter the Yubikey and pin? (I'm not all that technical and I use encryption for one specific project, so I appreciate dumbing down something that is probably very obvious.)
Using keys generated on a Yubikey is a practically identical process to using your old keys, with one extra step of set up.
To use keys stored on a Yubikey, you need "key stubs" registered on your PGP system. Basically, these are references that tell your PGP software "This private key is located on smartcard number #123456." Once you have the stubs to the keys you need, Enigmail should treat the Yubikey-stored keys like any other PGP key.
I'm only familiar with GnuPG, so specifics may vary, but using GPG you need to
Have a copy of the public key imported to your system from a key server or the like.
Import key stubs from your smart card (in this case, your Yubikey) using:
gpg --card-status
After that, checking your private keyring should reflect that you have stubs pointing to private keys stored on a smart card (denoted by the > after sub). I.E.
gpg --list-secret-keys
----------------------------------------------------
sec# rsa2048 2018-01-02 [C] [expires: 2020-01-02]
ABCDEF123456789ABCDEF123456789ABCDEF1234
uid [ ultimate] My Name (My PGP key) <anAddress#somesite.com>
ssb> rsa2048 2018-01-02 [S] [expires: 2018-12-31]
ssb> rsa2048 2018-01-02 [E] [expires: 2018-12-31]
ssb> rsa2048 2018-01-02 [A] [expires: 2018-12-31]
At this point you can use sub keys of CDEF1234 as if there were on your system. Your PGP software ought to handle checking the card is inserted and dealing with PIN entry.

How to locate the private key of a certificate in Windows

I want to locate the private key of a certificate in the current user certificate store in Windows. Does anyone know where the private key is saved?
This article describes where private keys are stored on a filesystem: Key Storage and Retrieval
To determine exact file name, run the following command in the Command Prompt:
certutil -user -store my "<SerialNumber>"
where <SerialNumber> is the serial number of the target certificate. If certificate contains private key, there will be Unique Container Name field which contains file name.
You can see the certificates in the Microsoft Management Console (MMC). See here a guide with some steps:
https://msdn.microsoft.com/en-us/library/ms788967(v=vs.110).aspx

Encrypting a Private Message

I am using both the Private Message module and the Encrypt modules. I can of course create a field which is encrypted, but it looks like I must alter the PM module since its storage in the database is not encrypted. Isn't exactly private then is it. Permissions are not enough to make it a Private Message.
I assume I will need to add the Encrypt code directly to the module itself. Does anyone have any idea where I would add it and how?
Thanks
The module is named "private messages" because the messages are private between the sender & recipient, no one else can see the messages.
If you want to encrypt the database, then you can directly use the database API hooks. You will also have to alter the schema of private messages module I believe.
For HTTPS you can use https://drupal.org/project/securepages
And for encrypting the form submitted data, you can go with http://www.jcryption.org/ or even more interesting http://crypto.stanford.edu/sjcl/
I've done something similar before to store encrypted images directly in the DB (for passport photos).
I've just had a quick look at the private messages module and it looks like you'll need to modify the main .module file. Search though it for db_insert. At around line 1836 is the bit that saves the message to the db.
If you add:
$message->body = encrypt($message->body);
before the line:
$args['body'] = $message->body;
Then that will handle the encryption.
Then you need to find where it gets back out the DB and put the decryption function in there.

decrypting file from eToken

I am new to cryptography, hence I want to ask about my company's requirements.
We are using eToken with RSA support.
I have developed a code that encrypt file with public key and stored it in another file.
Now I want to pass the encrypted file to eToken, and here is my issue.
How can I access the eToken from a Java applet?
Is it right that I have to pass encrypted file to eToken and it will decrypt file for me?
How can I do this?

Resources