Mike Frysinger wrote:
On Mon, Jul 20, 2009 at 09:51, Fred Keet wrote:
I'm in the process of writing an application that signs binary data for
loading
onto a Analog Devices BlackFin microprocessor. These chips have "built in"
support for verification of code. The chip gets loaded with the EC public
key,
and then you just update the code and signature on every update.

My problem is with their specific implementation of FIPS 186-2. They specify
the
parameters as below, and I would like to know which are important, and where
do I add them? They use a Koblitz curve for the keys (sect163k1). I'm under
the
impression that just using the correct curve should be sufficient, but would
like
to make sure.

1. m: 163 (dimension of binary field)
2. a: 1
3. b: 1 (a and b are the constants in the elliptic curve equation: y2 + xy =
x3 + ax + b)
4. Xg: 2FE13C0537BBC11ACAA07D793DE4E6D5E5C94EEE8
5. Yg: 289070FB05D38FF58321F2E800536D538CCDAA3D9 (Xg and Yg define a point G
on the        curve above)
6. n: 4000000000000000000020108A2E0CC0D99F8A5EF (n is the order of the point
G)
7. k3: 7
8. k2: 6
9. k1: 3 (k1, k2, and k3 specify the field pentanomial x^m + x^k3 + x^k2 +
x^k1 + 1)

http://marc.info/?t=124725063100003&r=1&w=2
-mike
Thanks Mike.

At this point I've got code that generates the ec keys from the sect163k1 curve, and then signs a block of data. When I compare this with the ecsign utility they provide (apparently built on Miracl) the two signatures do not match, so it seems that the curve parameters will be necessary. I don't think the random number file should be necessary if you've got /dev/random for OpenSSL to read data off of?

Having a look at ec_group_st we've got poly[], a, b which should correlate with k1,k2,k3 and thus a, b, Xg, Yg and n should probably go in field, similar to the values of _EC_NIST_CHAR2_163K. n, x, y, a, b Already matches and I've no idea what p should be, so I'll just leave that as is.

The code states to use the method functions to manipulate ec_group_st.poly, but I've yet to find the relevant functions. Could someone please point me to the correct file?

Analog Devices technical support just keeps telling me that they base their stuff on FIPS 186-2 and to go look at http://www.cryptopp.com/ , http://ez.analog.com/thread/1157;jsessionid=29EF34998932BBB9621A1A09248ECC81 , http://files.codes-sources.com/fichier_fullscreen.aspx?id=41412&f=Source+code%5CC+library%5Cmiracl%5Csource%5Cecsgen.cpp&lang=en , http://www.shamus.ie/ and http://www.ellipticsemi.com/middleware_asymmetric.php which doesn't help much with a OpenSSL implementation.

Fred
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to