Re: Need simple lib for asymetric encryption




"Unruh" <unruh-spam@xxxxxxxxxxxxxx> wrote in message
news:ebctul$p2m$1@xxxxxxxxxxxxxxxxxxxxxxxxx
"amzoti" <amzoti@xxxxxxxxx> writes:


Oliver Eichler wrote:
Hi,

I am not a crypto specialist, thus please forgive me if I sound a
little bit
clueless.

I would like to encrypt some data with key1 and decrypt it again with
key2.
If I got it right from all the stuff I have read so far you refere to
key1
as 'public key' and to key2 as 'private key'. Normally the public key
is
generated from the private key. Thus, who got the private key can
always
generate the public key. Is this mandatory?

Public key crypto is abysmally slow. Noone ever actually encrypts data
with
a public key. They encrypt a random key for symmetric key crypto (ie the
same key encrypts and decrypts loosely speaking) and use that much faster
symmetric crypto to actually encrypt the data.

Since one HAS to generate both the encryption and decryption key and has
to
make sure that the decryption key actually decrypts and that it is not
derivable from any public data, it would seem that the only way is to
derive the public key from the private, or at least both from some other
private data.


What algorithm would I need to satisfy my needs? And is there a simple
to
use, light weight C library?

RSA, DSA, Elliptic curve crypto.


I have looked into cryptlib, beecrypt and others.But they all seem to
be an
overkill to my problem with a quite hard to understand API. Isn't there
something like :

I think that maybe you need to learn more before trying to impliment
crypto. The algorithm is the least of your worries. Key control is a far
worse worry.

Could you elaborate on that? Once generated you simply store the keys
somewhere on the disk, right?



--
Posted via a free Usenet account from http://www.teranews.com

.



Relevant Pages

  • RE: CryptDecrypt fails with NTE_BAD_DATA
    ... As Sylvain explained you are completely misusing the crypto. ... You ecnrypt the message with the SESSION Key iwth CryptEncrypt ... decrypt the message with the session key using CryptDecrypt ... I encrypt the data in chunks of 117 bytes that become 128 bytes. ...
    (microsoft.public.platformsdk.security)
  • Improving the AONT pakagetransform
    ... That aside in in Ron's all or nothing package transform you take a ... a long message of English text you first encrypt it say with AES in a ... At this point say your stuck with 40 bit crypto you then encrypt ... Yet the fact is such an attack even with the larger ...
    (sci.crypt)
  • Re: AES and Diehard
    ... >> different encrypted files every time you encrypt a file with the same ... > you tell how the receiver is going to correctly decrypt, ... haven't you learned anything about crypto yet. ... first block used gets you back in synch. ...
    (sci.crypt)
  • Re: How to verify a SignedData with Crypto++
    ... > signature (RSA) using the public key and get the digest. ... > find a way to decrypt with RSA using the public key. ... I'm not aware of any particularly good documentation for Crypto++: ...
    (sci.crypt)
  • Re: CryptDecrypt fails with NTE_BAD_DATA
    ... crypto (if both sides XP than AES would be fine; ... You ecnrypt the message with the SESSION Key iwth CryptEncrypt ... decrypt the message with the session key using CryptDecrypt ... I encrypt the data in chunks of 117 bytes that become 128 bytes. ...
    (microsoft.public.platformsdk.security)