EldoS | Feel safer!

Software components for data protection, secure storage and transfer

need some guidance and terminology

Also by EldoS: CallbackDisk
Create virtual disks backed by memory or custom location, expose disk images as disks and more.
#460
Posted: 06/16/2006 11:25:28
by George Freeman (Basic support level)
Joined: 06/16/2006
Posts: 9

I want to be able to encrypt a file using pgp and send it to a 3rd party. To do this with your secure blackbox pgp product I need some direction.

I need a test harness on my side that takes a public key and encrypts the file. For testing, I need to be able to then decrypt the file with the private key.

How do I generate a public and private key pair? (ie the PGPKeys\PGPKeysDemo_VS2005.sln appears to be able to generate a key it isn't apparent how to generate a pair. When I run that and generate a key and export it I get a file which says "-----BEGIN PGP PUBLIC KEY BLOCK-----" but I don't see an option for how to generate a key pair or to get a matchine private key.

Do I need to genearte a certificate instead? and then how do I get a public/private key pair from the certificate?

There is a lot to the product I've downloaded and I don't have a lot of time to dig through lots of examples that are not relevant.

I'm hoping you have examples to do what I'm trying to do. I'm using C#.net
#463
Posted: 06/16/2006 11:58:06
by Ken Ivanov (EldoS Corp.)

Quote
How do I generate a public and private key pair? (ie the PGPKeys\PGPKeysDemo_VS2005.sln appears to be able to generate a key it isn't apparent how to generate a pair.

Actually, PGPKeysDemo *always* generates a keypair. Generating a key (either public or secret) does not make sense, as both parts of a keypair are required for public key operations. That's why a 'key' term is often used as a synonym for 'keypair' term.

However, PGPKeysDemo does not support secret key export. If you wish to generate a keypair and export it to two separate files (public key file and secret key file), please do the following:
a) create a new keyring,
b) generate a keypair,
c) click the 'Save keyring' button.

We will implement the necessary changes to PGPKeysDemo to allow it export secret keys too.
#489
Posted: 06/19/2006 13:51:53
by George Freeman (Basic support level)
Joined: 06/16/2006
Posts: 9

Thanks for your help. This got me going.
#1525
Posted: 10/23/2006 10:06:54
by Rav Panesar (Basic support level)
Joined: 10/19/2006
Posts: 14

sorry wrong post
#13571
Posted: 06/01/2010 17:43:30
by Richard Dufour (Basic support level)
Joined: 06/01/2010
Posts: 6

Where can I find this so called PGPKeysDemo?

I have been starring at this code all day trying to make sense of this. The lack of documentation is really frustrating to say the least.

You wrote:
"...If you wish to generate a keypair and export it to two separate files (public key file and secret key file), please do the following:

a) create a new keyring,
b) generate a keypair,
c) click the 'Save keyring' button. ..."

How do I do step B?
What 'Save keyring' button are you talking about?

Please help.
#13572
Posted: 06/02/2010 00:39:11
by Eugene Mayevski (EldoS Corp.)

The demo you are asking is in samples folder (go to Start Menu -> Programs -> SecureBlackbox ).

Documentation including how-to guides is accessible via Start Menu and also online.


Sincerely yours
Eugene Mayevski
#13586
Posted: 06/04/2010 17:39:16
by Richard Dufour (Basic support level)
Joined: 06/01/2010
Posts: 6

Hi Eugene,

You said in an earlier post (2005) "...We will implement the necessary changes to PGPKeysDemo to allow it export secret keys too..."

Can I get a copy of that enhanced demo? The demo I have creates a Private Key file but what I need is the export of the private key to a file readable user (readable test file).

Ex:
BEGIN PGP PRIVATE ...
xyx...
END ...

I modified the demo to do this but the file (opened in Notepad is unreadable):

procedure TfrmKeys.actExportKeyExecute(Sender: TObject);
var
PublicKey: TElPGPPublicKey;
PrivateKey: TElPGPSecretKey;
begin
// Export the Public Key to a file.
if ((tvKeyring.Selected <> nil) and (TObject(tvKeyring.Selected.Data) is TElPGPPublicKey)) then
begin
PublicKey := TElPGPPublicKey(tvKeyring.Selected.Data);
if SaveDlg.Execute then
begin
// Public Key File have an asc extension.
PublicKey.SaveToFile(SaveDlg.FileName + '.asc', True);
if ( PublicKey.SecretKey <> nil ) then
PublicKey.SecretKey.SaveToFile( SaveDlg.FileName + '.skr', True);
SetStatus('Public Key saved');
end;
end;

// Export the Private Key to a file.
if ((tvKeyring.Selected <> nil) and (TObject(tvKeyring.Selected.Data) is TElPGPSecretKey)) then
begin
PrivateKey := TElPGPSecretKey(tvKeyring.Selected.Data);
if SaveDlg.Execute then
begin
// Public Key File have an asc extension.
PrivateKey.SaveToFile(SaveDlg.FileName, True);
SetStatus('Private Key saved');
end;
end;

end;

I need the Private Key in a human readable format.

Thanks for your help.
#13599
Posted: 06/07/2010 10:05:05
by Richard Dufour (Basic support level)
Joined: 06/01/2010
Posts: 6

Never mind Eugene, I found it. I had to set the Armor parameter of SecretKey.SaveToFile to True.

I now have a secret file that looks like this:

-----BEGIN PGP PRIVATE KEY BLOCK-----
Version: SecureBlackbox 7 (PGPBlackbox)

lQHsBEwGeM0BBADK4WTqEo2dMSUl+9BnhB/wm9J5PU7Uh0jgrVpQWQNytnvKQXys
mYkusbjwn/N7YxeGgZk9kjZ0+pkyHGKzOcLtyIMxFy2rCvuECdVGQCxEa54LEOVM
9+tZfeafNZJEl2a5cxTD27yC1dlxb4NAjBIHqEzw36CATSRWl4m6HF4rMQARAQAB
/wMDAk8PZCM7PRoOYDGOEuP+9kOhqpPSbWX/6fKsjdcxjULpt3Umx8SB8Wsqrtqu
CBvTUf3y7zBjMeDOIL5ssuGL4a6ELK1GunMj/E5RJk9hzwpoxo/2ydcIssvXRYEb
LiOFFHI/jYDF92GUuOzA8v3d6GQ5HjfC/ovVGA4vPWox/6VdlK+dJ4sN0ckFaooX
Sd/GezDdSDSp7GiVg1He3amn22NPZBf3/qe5h6bXZGcXdCoeslLucfqtGnnTwxo8
4AdcX7OMoeSGhXxWa2kDlrkCONbfwchiC39Mt1TCBktYeKr+FeUnk+eTIHUgm2X+
7+nvrLTvdfd/K4rtseHbbd6LfeRmqALePv1LS7g/Tudz8fzAgXViT6BJu36lRhnA
6VFky/WE6oeYXsY8pyhvEb8A5TuJRqODn5k4rwD2GsUNMrO9z/BlVfeedw5utvd8
4MzM6gohKHofgoQ0vN8QzQ1SaWNoYXJkPFRlc3Q+
=UIjF
-----END PGP PRIVATE KEY BLOCK-----

Sure wasn't obvious though. A little improvement on the documentation wouldn't hurt.
#13600
Posted: 06/07/2010 10:47:39
by Eugene Mayevski (EldoS Corp.)

How would you like us to add this information to the help file? I.e. where in the help file would you expect to see it? We have an article in the knowledgebase about this.


Sincerely yours
Eugene Mayevski
#13630
Posted: 06/09/2010 09:47:48
by Richard Dufour (Basic support level)
Joined: 06/01/2010
Posts: 6

Hi Eugene,

The thing is, I noticed a lot of posts keep coming back about the same questions (how do I generate a plain text Public and Private key). A lot of the folks asking these questions are not experts in the field of encryption (I realize that they should read up about PGP and gain more knowledge), but I believe making it simpler for the novice users may reduce these questions from being asked over and over and improve the overall satisfaction of your product.

A simple approach I usually like is by clear examples (demos). In evaluating your product, I wrote my own demo that does just that (shows how to create a Public / Private key (plain text base64 and not), shows how to encrypt and decrypt a single text value OR a file. Explains the idea of king rings, passphrases, different type of bites encryption, etc.

"...How would you like us to add this information..." at this point, just enhancing your current demo to export the private key (Armored/plain text).

Thanks Eugene.
Also by EldoS: Callback File System
Create virtual file systems and disks, expose and manage remote data as if they were files on the local disk.

Reply

Statistics

Topic viewed 5077 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!