🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #8400

Using CryptoApi

#8400
From: nicolasr
Date: Thu, 28 Oct 2004 22:25
31 lines
1981 bytes
Hi,

my program needs to encrypt some data and
save it in an options file (user, password etc).

In my first version I used an XOr algorithm
and had the key hard-coded in my exe-file.

For the next version I would rather use a
more secure method. I'm trying to use CryptoApi
with an RC2 algorithm. As documented I derive
the key for the algorithm from a password. The problem
is, again, that I have this password hard-coded.
I do this because the session keys are not persisted
between sessions. Using the password I can recreate
the same key. But this isn't more secure than my
original approach.

I now read that each key container for a user has
two private/public key pairs. Can I use those keys
to encrypt/decrypt my data?
The docs state that one in general uses session keys to
encrypt data because symmetric algorithms are about 1000
times faster. But since my amount of data is small
it wouldn't be a problem for me to use a private/public-key
algorithm.

So, is there a common strategy to handle this?

thanks for any idea,
Nick
Technical Details
Message-ID: <418171e2$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!news.wiretrip.org!border2.nntp.ams.giganews.com!nntp.giganews.com!news-hub.cableinet.net!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,3930ddc9c1eadcf0,start
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "nicolasr" <nicolasrNOSPAMATSIGNgmx.net>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Using CryptoApi
Date: Fri, 29 Oct 2004 00:25:35 +0200
Lines: 33
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 80.133.189.82
Message-ID: <418171e2$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1099002338 80.133.189.82 (28 Oct 2004 15:25:38 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!news.wiretrip.org!border2.nntp.ams.giganews.com!nntp.giganews.com!news-hub.cableinet.net!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail