Re: [PHP-DEV] openssl module for php

2001-05-04 Thread Wez Furlong
I've applied Saschas patch to latest CVS; it's more or less gone in as supplied, although I've slightly modified resource allocation/checking (if emalloc fails then PHP dies, so there is no need to check the return value) and made the padding constants case sensitive in "php space". Sascha, I wou

Re: [PHP-DEV] openssl module for php

2001-05-04 Thread Sascha Kettler
> On Fri, May 04, 2001 at 09:09:51PM +0100, Wez Furlong wrote: > > On 2001-05-04 20:47:25, "Stig Venaas" <[EMAIL PROTECTED]> wrote: > > > Even though it is 4 functions, I think users will find it easier to > > > work with functions called openssl_public_encrypt, > > > openssl_private_decrypt etc.

Re: [PHP-DEV] openssl module for php

2001-05-04 Thread Sascha Kettler
> > I've used SSLeay back in 1996 once, and then a few weeks ago for my > patch. > > You don't need to be an openssl expert, but as with all cryptography you > > should have some basic understanding before using it. > > which is why i'm still confused on how you intend to get any of the > openssl

Re: [PHP-DEV] openssl module for php

2001-05-04 Thread Stig Venaas
On Fri, May 04, 2001 at 09:09:51PM +0100, Wez Furlong wrote: > On 2001-05-04 20:47:25, "Stig Venaas" <[EMAIL PROTECTED]> wrote: > > Even though it is 4 functions, I think users will find it easier to > > work with functions called openssl_public_encrypt, > > openssl_private_decrypt etc. It also se

Re: [PHP-DEV] openssl module for php

2001-05-04 Thread spencer 'sporty' portee
> I've used SSLeay back in 1996 once, and then a few weeks ago for my patch. > You don't need to be an openssl expert, but as with all cryptography you > should have some basic understanding before using it. which is why i'm still confused on how you intend to get any of the openssl functions to

Re: [PHP-DEV] openssl module for php

2001-05-04 Thread Sascha Kettler
> On 2001-05-04 20:47:25, "Stig Venaas" <[EMAIL PROTECTED]> wrote: > > Even though it is 4 functions, I think users will find it easier to > > work with functions called openssl_public_encrypt, > > openssl_private_decrypt etc. It also separates them from possible > > symmetric enryption later on.

Re: [PHP-DEV] openssl module for php

2001-05-04 Thread Sascha Kettler
> On 2001-05-04 20:21:28, "Sascha Kettler" <[EMAIL PROTECTED]> wrote: > > Sounds ok, although I wouldn't call it openssl_key_* but openssl_asym_* > > similar. > > Yeah, that sounds better. > > > I don't know what people would prefer: Separate functions or a > > boolean. What's the general opinio

Re: [PHP-DEV] openssl module for php

2001-05-04 Thread Wez Furlong
On 2001-05-04 20:21:28, "Sascha Kettler" <[EMAIL PROTECTED]> wrote: > Sounds ok, although I wouldn't call it openssl_key_* but openssl_asym_* > similar. Yeah, that sounds better. > I don't know what people would prefer: Separate functions or a > boolean. What's the general opinion on that? IMHO

Re: [PHP-DEV] openssl module for php

2001-05-04 Thread Wez Furlong
On 2001-05-04 20:47:25, "Stig Venaas" <[EMAIL PROTECTED]> wrote: > Even though it is 4 functions, I think users will find it easier to > work with functions called openssl_public_encrypt, > openssl_private_decrypt etc. It also separates them from possible > symmetric enryption later on. So are we

Re: [PHP-DEV] openssl module for php

2001-05-04 Thread Sascha Kettler
[...] > Even though it is 4 functions, I think users will find it easier to > work with functions called openssl_public_encrypt, > openssl_private_decrypt etc. It also separates them from possible > symmetric enryption later on. > > How about returning the result like this: > > string openssl_pu

Re: [PHP-DEV] openssl module for php

2001-05-04 Thread Stig Venaas
On Fri, May 04, 2001 at 09:21:28PM +0200, Sascha Kettler wrote: > > On 2001-05-04 17:59:03, "Stig Venaas" <[EMAIL PROTECTED]> wrote: > > > followed up on that. It would be good if you and Sascha Kettler could > > > agree on how the API should be > > > > How about: > > > > openssl_key_encrypt( >

Re: [PHP-DEV] openssl module for php

2001-05-04 Thread Sascha Kettler
> On 2001-05-04 18:22:03, "Sascha Kettler" <[EMAIL PROTECTED]> wrote: > > You won't need to pass the algorithm by an arg, as the key already > contains > > the algorithm identification (pkey->type). I haven't used any DSA > encryption > > yet, but maybe you can just add the code to the switch stat

Re: [PHP-DEV] openssl module for php

2001-05-04 Thread Sascha Kettler
> On 2001-05-04 17:59:03, "Stig Venaas" <[EMAIL PROTECTED]> wrote: > > followed up on that. It would be good if you and Sascha Kettler could > > agree on how the API should be > > How about: > > openssl_key_encrypt( > string data, // to encrypt > string &crypted, // encrypted result > mi

Re: [PHP-DEV] openssl module for php

2001-05-04 Thread Wez Furlong
On 2001-05-04 18:22:03, "Sascha Kettler" <[EMAIL PROTECTED]> wrote: > You won't need to pass the algorithm by an arg, as the key already contains > the algorithm identification (pkey->type). I haven't used any DSA encryption > yet, but maybe you can just add the code to the switch statements. Yes

Re: [PHP-DEV] openssl module for php

2001-05-04 Thread Wez Furlong
On 2001-05-04 19:05:05, "spencer 'sporty' portee" <[EMAIL PROTECTED]> wrote: > > On Fri, May 04, 2001 at 07:22:03PM +0200, Sascha Kettler wrote: > > > You won't need to pass the algorithm by an arg, as the key already contains > > > the algorithm identification (pkey->type). I haven't used any DSA

Re: [PHP-DEV] openssl module for php

2001-05-04 Thread Wez Furlong
On 2001-05-04 17:59:03, "Stig Venaas" <[EMAIL PROTECTED]> wrote: > followed up on that. It would be good if you and Sascha Kettler could > agree on how the API should be How about: openssl_key_encrypt( string data, // to encrypt string &crypted, // encrypted result mixed key, // key to u

Re: [PHP-DEV] openssl module for php

2001-05-04 Thread spencer 'sporty' portee
> On Fri, May 04, 2001 at 07:22:03PM +0200, Sascha Kettler wrote: > > You won't need to pass the algorithm by an arg, as the key already contains > > the algorithm identification (pkey->type). I haven't used any DSA encryption > > yet, but maybe you can just add the code to the switch statements.

Re: [PHP-DEV] openssl module for php

2001-05-04 Thread Stig Venaas
On Fri, May 04, 2001 at 07:22:03PM +0200, Sascha Kettler wrote: > You won't need to pass the algorithm by an arg, as the key already contains > the algorithm identification (pkey->type). I haven't used any DSA encryption > yet, but maybe you can just add the code to the switch statements. Ah yes,

Re: [PHP-DEV] openssl module for php

2001-05-04 Thread Sascha Kettler
> On 2001-05-04 17:59:03, "Stig Venaas" <[EMAIL PROTECTED]> wrote: > > This sounds good, please have a look at bug report 10665 by > > [EMAIL PROTECTED], he has implemented RSA encryption, and [EMAIL PROTECTED] > > followed up on that. It would be good if you and Sascha Kettler could > > agree on

Re: [PHP-DEV] openssl module for php

2001-05-04 Thread Wez Furlong
On 2001-05-04 17:59:03, "Stig Venaas" <[EMAIL PROTECTED]> wrote: > This sounds good, please have a look at bug report 10665 by > [EMAIL PROTECTED], he has implemented RSA encryption, and [EMAIL PROTECTED] > followed up on that. It would be good if you and Sascha Kettler could > agree on how the AP

Re: [PHP-DEV] openssl module for php

2001-05-04 Thread Stig Venaas
On Thu, Apr 26, 2001 at 11:42:24AM -0400, spencer 'sporty' portee wrote: > As of late, the company I work for, Community Connect, needs to extend the > openssl php module and might be able to release the source. It is for RSA > encryption, but in my own interest, i would like to add on the other

[PHP-DEV] openssl module for php

2001-04-26 Thread spencer 'sporty' portee
As of late, the company I work for, Community Connect, needs to extend the openssl php module and might be able to release the source. It is for RSA encryption, but in my own interest, i would like to add on the other types of algorithms to it too. I understand that there are more complex funct