Re: [Ocf-linux-users] Public Key Operation help.
Brought to you by:
david-m
|
From: David M. <Dav...@se...> - 2008-10-17 05:16:16
|
Jivin Nawang Chhetan lays it down ... > Hi David, > I am trying to perform MODEXP operation through OCF. Device I > am using is "safe". But I am totally lost is middle with issues like: > 1. Endianess: Looking at the cryptoktest program it seems we have to pass > the data to "ocf" in Little Endian format. Thats sounds about right. > 2. Word Length: While converting a byte string into Little Endian format, I > am not sure what is the length of a word(4bytes or 8 bytes). The parameters for OCF MODEXP are byte arrays, all the code I can see works on bytes. The BIGNUM format from openssl however is word based IIRC. > With lack of proper API documentation I am finding it even hard. > Can you give me some pointers where I can clear my above doubts. You might find it easier to look at the openswan patches and how it converts various formats to the OCF version and back. Although both cryptokeytest and openswan convert from BIGNUM to OCF format. It may help to understand the BIGNUM format first. Then you can see how cryptokeytest does the same op using both openssl and it's own modexp, Cheers, Davidm -- David McCullough, dav...@se..., Ph:+61 734352815 Secure Computing - SnapGear http://www.uCdot.org http://www.snapgear.com |