MCFCAU library - documentation or sample pgms

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MCFCAU library - documentation or sample pgms

1,850 Views
lel_chen
Contributor I

Hi,

        I need to use the SHA-1 algorithm to verify the checksum. The controller used is Coldfire V2. I got the CAU library [Author: Andrey Butok] from Freescale support unit. If any of you could provide any supporting documentation or sample programs for usage of the SHA-1 algorithm, it would be great.

 

Thanks.

Labels (1)
0 Kudos
5 Replies

421 Views
butok
NXP Employee
NXP Employee

Hello Chen, 

 

I do not know what exactly you have got from the support.But I believe that you have got one of the CAU Linux drivers developed two years ago for MCF54455 LTIB  (there is probability that they were ported to other platforms).

I have attached very short description (how to test it). These drivers have standard Linux driver crypto API, so look to Linux docs coming with the kernel for more information.

 

If you are going to use it as standalone library drivers you have to port it (I am not aware if it was done somebody else). Do not forget that it has GNU GPL license. 

 

BTW:

Also there is standalone CAU library released as binary only (ask if you interested). But source code is not available (even for me). 

 

Best regards,

Andrey Butok

 

0 Kudos

421 Views
lel_chen
Contributor I

Hi Butok,

        I have gone through the file "mcfcau-sh1.c" [dated 2007].It lists functions such as "mcfcau_sha1_update". Could you please expain me as to what the "

struct crypto_tfm *tfm" structure is? My basic intention is to use SHA-1 algorithm to verify the checksum of a memory chunk. Will I be able to acheive this using this library? Iam new to this and if you could please explain me as to how to make use of this software library to meet my objectibes, it would be great.

 

Has this library been ported to any other platforms?

 

The attachment shows the library that I have received.

 

Thanks,

Chen

0 Kudos

421 Views
butok
NXP Employee
NXP Employee

Hi Chen,

 

These Linux drivers are low-level and are not called by a user directly.

To understand how it works you should have the whole LTIB Kernel source code and to dig in it. The Linux Kernel Crypto documentation is very poor: http://www.mjmwired.net/kernel/Documentation/crypto/descore-readme.txt

http://www.mjmwired.net/kernel/Documentation/crypto/api-intro.txt

http://www.mjmwired.net/kernel/Documentation/crypto/async-tx-api.txt

It’s very tough area. Be ready to spend a lot of time. Also you can try to google (should be something new now, as I am out of this area long time).

  

If you like to create own stand-alone driver you should not waste time with the Linux crypto control structure organization and etc. You just need to try to reuse code from mcfcau_sha1_transform() assembler (but I am not able to help you in it).

 

If you do not need a source code, the best solution for you will be the binary library (is attached). I have not found the header API file, but you can reproduce it from the attached doc.

It should work for every platform that has CAU module (but I did not test it).

 

Best regards,

Andrey Butok

0 Kudos

421 Views
lel_chen
Contributor I

Yes Butok,I would like to create own stand-alone driver.

But I dint understand as to where you are referring for the "mcfcau_sha1_transform()".

Kindly point me to the same, so that i can develop the driver from there.


 

 

0 Kudos

421 Views
epeterson
Contributor I

Hello,

 

I have a basic question about the cau library for sha1.

 

One of the API is

 

void cau_sha1_update(const unsigned char *msg_data,const int num_blks,unsigned char *sha1_state)

 

After calling this, where does the hashed data get stored? 

 

kind regards,

~erik

0 Kudos