Recent

Author Topic: RSA Encryption  (Read 13564 times)

mbdev

  • New Member
  • *
  • Posts: 44
RSA Encryption
« on: November 08, 2013, 08:52:52 pm »
Hello,

I found an interesting implementation of the OpenSSL library:
http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/packages/openssl/src/

Now I'm just wondering how to encrypt and decrypt a stream because only a key-generation example is existing. Does anybody now how to deal with streams and RSA?

I'm looking forward to hearing from you ;)

mbdev

  • New Member
  • *
  • Posts: 44
Re: RSA Encryption
« Reply #1 on: November 29, 2013, 07:30:59 pm »
This are the functions :/

Code: [Select]
  function RSA_public_encrypt(flen: cint; from_buf, to_buf: PByte; arsa: PRSA; padding: cint): cint;
  function RSA_private_encrypt(flen: cint; from_buf, to_buf: PByte; arsa: PRSA; padding: cint): cint;
  function RSA_public_decrypt(flen: cint; from_buf, to_buf: PByte; arsa: PRSA; padding: cint): cint;
  function RSA_private_decrypt(flen: cint; from_buf, to_buf: PByte; arsa: PRSA; padding: cint): cint;

zeljko

  • Hero Member
  • *****
  • Posts: 1906
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: RSA Encryption
« Reply #2 on: November 29, 2013, 08:45:28 pm »
Simple "RSA_public_encrypt example"  in google search does not help ?  Strange. It works for me ...here are 3rd and 4th result (first two are man pages links)
http://www.experts-exchange.com/Programming/Languages/C/Q_21705833.html
https://shanetully.com/2012/04/simple-public-key-encryption-with-rsa-and-openssl/

mbdev

  • New Member
  • *
  • Posts: 44
Re: RSA Encryption
« Reply #3 on: November 29, 2013, 09:20:03 pm »
hm C-Code  :(

After searching a bit for Delphi I found this and will try it later :)
http://www.disi.unige.it/person/FerranteM/delphiopenssl/RSAEncrypt.html

 

TinyPortal © 2005-2018