RE: Ciphers and modes of operation

2010-02-24 Thread Cheng, Weidong
);
 if (mac == NULL)
 fprintf(stderr,  - Mac is NULL);
 fprintf(stderr, \n);
decryption_failed_or_bad_record_mac = 1;
}
}

As you can see, this last printf Mac is NULL is not printed.

I hope you won't be drowned by this flaw of information but I also hope I gave 
you enough information so you could be able to give me a hand.

Regards,
Grégory BELLIER.




Cheng, Weidong a écrit :

Please give more information as Stephen suggested.







-Original Message-

From: owner-openssl-...@openssl.orgmailto:owner-openssl-...@openssl.org 
[mailto:owner-openssl-...@openssl.org] On Behalf Of Gregory BELLIER

Sent: Tuesday, February 23, 2010 8:48 AM

To: openssl-dev@openssl.orgmailto:openssl-dev@openssl.org

Subject: Re: Ciphers and modes of operation



I did some tests and it failed to build if I don't declare all the

operation modes.

Do you have any ideas how I could proceed ?



Thanks.







Cheng, Weidong a écrit :



Hi, Gregory;



Yes. You could implement some of them.



Regards,



Weidong



-Original Message-

From: owner-openssl-...@openssl.orgmailto:owner-openssl-...@openssl.org 
[mailto:owner-openssl-...@openssl.org] On Behalf Of Gregory BELLIER

Sent: Tuesday, February 23, 2010 7:45 AM

To: openssl-dev@openssl.orgmailto:openssl-dev@openssl.org

Subject: Ciphers and modes of operation



Hello.



Simple question, is it mandatory to declare the cbc, ecb, cfb, ofb for

each cipher or is it possible to only declare and implement some of them

(let's say ecb and cbc) ?



Regards,

Grégory BELLIER.





__

OpenSSL Project http://www.openssl.org

Development Mailing List   
openssl-dev@openssl.orgmailto:openssl-dev@openssl.org

Automated List Manager   
majord...@openssl.orgmailto:majord...@openssl.org

__

OpenSSL Project http://www.openssl.org

Development Mailing List   
openssl-dev@openssl.orgmailto:openssl-dev@openssl.org

Automated List Manager   
majord...@openssl.orgmailto:majord...@openssl.org









__

OpenSSL Project http://www.openssl.org

Development Mailing List   
openssl-dev@openssl.orgmailto:openssl-dev@openssl.org

Automated List Manager   
majord...@openssl.orgmailto:majord...@openssl.org

__

OpenSSL Project http://www.openssl.org

Development Mailing List   
openssl-dev@openssl.orgmailto:openssl-dev@openssl.org

Automated List Manager   
majord...@openssl.orgmailto:majord...@openssl.org




RE: Ciphers and modes of operation

2010-02-23 Thread Cheng, Weidong
Hi, Gregory;

Yes. You could implement some of them. 

Regards,

Weidong

-Original Message-
From: owner-openssl-...@openssl.org [mailto:owner-openssl-...@openssl.org] On 
Behalf Of Gregory BELLIER
Sent: Tuesday, February 23, 2010 7:45 AM
To: openssl-dev@openssl.org
Subject: Ciphers and modes of operation

Hello.

Simple question, is it mandatory to declare the cbc, ecb, cfb, ofb for 
each cipher or is it possible to only declare and implement some of them 
(let's say ecb and cbc) ?

Regards,
Grégory BELLIER.


__
OpenSSL Project http://www.openssl.org
Development Mailing List   openssl-dev@openssl.org
Automated List Manager   majord...@openssl.org
__
OpenSSL Project http://www.openssl.org
Development Mailing List   openssl-dev@openssl.org
Automated List Manager   majord...@openssl.org


RE: Ciphers and modes of operation

2010-02-23 Thread Cheng, Weidong
Please give more information as Stephen suggested.



-Original Message-
From: owner-openssl-...@openssl.org [mailto:owner-openssl-...@openssl.org] On 
Behalf Of Gregory BELLIER
Sent: Tuesday, February 23, 2010 8:48 AM
To: openssl-dev@openssl.org
Subject: Re: Ciphers and modes of operation

I did some tests and it failed to build if I don't declare all the 
operation modes.
Do you have any ideas how I could proceed ?

Thanks.



Cheng, Weidong a écrit :
 Hi, Gregory;

 Yes. You could implement some of them. 

 Regards,

 Weidong

 -Original Message-
 From: owner-openssl-...@openssl.org [mailto:owner-openssl-...@openssl.org] On 
 Behalf Of Gregory BELLIER
 Sent: Tuesday, February 23, 2010 7:45 AM
 To: openssl-dev@openssl.org
 Subject: Ciphers and modes of operation

 Hello.

 Simple question, is it mandatory to declare the cbc, ecb, cfb, ofb for 
 each cipher or is it possible to only declare and implement some of them 
 (let's say ecb and cbc) ?

 Regards,
 Grégory BELLIER.


 __
 OpenSSL Project http://www.openssl.org
 Development Mailing List   openssl-dev@openssl.org
 Automated List Manager   majord...@openssl.org
 __
 OpenSSL Project http://www.openssl.org
 Development Mailing List   openssl-dev@openssl.org
 Automated List Manager   majord...@openssl.org
   


__
OpenSSL Project http://www.openssl.org
Development Mailing List   openssl-dev@openssl.org
Automated List Manager   majord...@openssl.org
__
OpenSSL Project http://www.openssl.org
Development Mailing List   openssl-dev@openssl.org
Automated List Manager   majord...@openssl.org


Help needed

2010-02-02 Thread Cheng, Weidong
Hello,



I am implementing an engine for our company's hardware. I completed the engine 
body part by referencing other engine implementation. But I have a problem 
about the shared library which will be loaded by DSO_load function and bond to 
with some functions. I assume that the shared library should contain:

1: The engine itself built for the dynamic load;

2: The lower level interface functions which interface with the 
device drivers;



When I built the shared library, there is no problem to use the following 
command:

openssl engine - dynamic -pre SO_PATH:/x/librenesas.so  -pre LOAD



But if I run an aes-128-cbc encryption command by using the engine, the 
following error message comes out.



OpenSSL aes-128-cbc -in ifile -out ofile -e -K 
12345678901234567890123456789012 -iv 00 -engine renesas

openssl (lock_dbg_cb): already locked (mode=9, type=30) at e_renesas.c:276

openssl (lock_dbg_cb): not locked (mode=10, type=30) at eng_table.c:173

can't use that engine

1174:error:25066067:DSO support routines:DLFCN_LOAD:could not load the shared 
library:dso_dlfcn.c:162:filename(librenesas.sy

1174:error:25070067:DSO support routines:DSO_load:could not load the shared 
library:dso_lib.c:244:

1174:error:80067069:RainerAPI:RENESAS_ENGINE_INIT:reason(105):e_renesas.c:249:

1174:error:260B806D:engine routines:ENGINE_TABLE_REGISTER:init 
failed:eng_table.c:161:



It looks that I have two problems:

1: DSO_bind_func couldn't be successful;

2: The engine is locked already when I tried to use CRYPOT_w_lock 
function



Does anyone have any suggestion and advice?



Thanks a lot in advance,



Weidong