Jopsen.dk - A Personal website

December 29, 2007
SimpleECDSA, a simple implementation of ECDSA in C
Filed under: Computer,English,Linux,School by Jonas Finnemann Jensen at 14:32

2 weeks ago I did a school project on ECDSA (Elliptic Curve Digital Signature Algorithm). At HTX we have to do a project that goes beyond the curriculum, we must combine two subjects and do an individual project about something we find interesting. I decided to combine mathematics and programming in a project about ECDSA. Personally I think it was great fun, but perhaps I have a twisted sense of humor :)

Anyway, I’ve publish my report here, it’s in Danish though. But I did also write an implementation of ECDSA in C. The implementation is called SimpleECDSA, though I must admit it not very Simple anymore. It uses GMP as integer library, and uses the standardized curves cryptographic operations.

The comments in my source is in English, though I did translate them to Danish, before delivering my paper. Anyway, I still have the source with English comments, so I thought I’d post the source here.

As I had a little spare time this holiday I’ve configured the source with the GNU build system. It my first tarball created with Autotools, and it’s mostly hacked together of snippets from the automake and autoconf manual. But it works and the package compiles, and “./configure” complains if GMP isn’t present. I did also manage to get “make check” to run my internal tests, so I think it’s pretty good, considering the fact that is my first package build with autotools.

If you’ve any comments, bug-reports or questions to my packaging or SimpleECDSA, feel free to leave a comment. SimpleECDSA is ofcourse released under GNU GPLv3, and can be downloaded here:

42 Comments »

  1. I’m doing my graduation project,and find this article by google.Thanks,very useful!
    BTW,do u major in cryptography? or just interested in it?

    Comment by krisy — May 24, 2008 @ 11:39

  2. I’m attending HTX (http://en.wikipedia.org/wiki/Higher_Technical_Examination_Programme_(HTX)) in Denmark. Actually graduating in a few weeks, so I’m just interested and played with cryptography as school project…
    But I plan to study computer science next year, so who knows what I’ll get to play with…

    Anyway, good luck with your project…

    Comment by Jonas Finnemann Jensen — May 24, 2008 @ 16:19

  3. Hi Jonas,

    Have you an idea, how many CPU instructions are required to execute your SimpleECDSA?

    Best Regards,
    Sergey Nemanov
    Security System Architect,
    Freescale Semiconductor

    Comment by Sergey Nemanov — July 9, 2008 @ 16:14

  4. Hi Sergey,

    No, I have no idea as to how many CPU instructions it takes… Though SimpleECDSA has some benchmarking features where execution time is measured using functions from time.h

    However, I’ve got to say that SimpleECDSA is in no way an efficient implementation… It’s an implementation of ECDSA and it works to the extent that I’ve tested it with various test vectors… There’s still a lot of optimizations that can be applied, both to the code in general and in the sense of alternate algorithms for various calculations based on parameter properties.

    Regards Jonas Finnemann Jensen.

    Comment by Jonas Finnemann Jensen — July 10, 2008 @ 20:01

  5. I am working on cryptography and my back ground is SIGNAL PROCESSING and COMMUNICATION so i want to work on ECDSA and i want to use your source code so can i get it in C code and in the simpleecdsa gmp.h is not working so can you tell me how i can solve this problem.
    thank you
    kind regards
    welekiros

    Comment by welekiros gebrehowot — February 21, 2010 @ 20:29

  6. I just compiled SimpleECDSA on Ubuntu 9.10, so it still works :)
    You need to install the libgmp3, libgmp3-dev and build-essential packages…

    If your distro doesn’t have gmp in it’s package manager you can find it here: http://gmplib.org/

    GMP is GNU Multi-Precision Library, it enables integers of arbitrary size… SimpleECDSA needs it…

    Let me know if you have an problems building it…

    Comment by admin — February 21, 2010 @ 23:40

  7. Thank you very much for your fast reply.
    to compile it i am using microsoft XP.
    Basically i am going to implement it on FPGA using MicroBlaze processor or using EDK so can it be compliled on the xilinix compiler?
    thank you
    kind regards
    welekiros

    Comment by welekiros — February 25, 2010 @ 02:05

  8. I have never played with FPGA development, so can’t help you there… and I seriously doubt SimpleECDSA can be of much use there…

    Comment by admin — February 25, 2010 @ 02:35

  9. Dear Admin;
    it is nothing else it is the C code that i am going to use it on the FPGA not VHDL code as FPGA has microBlaze processor which receive C codes.
    thank you
    kind regards
    welekiros

    Comment by welekiros — February 25, 2010 @ 02:46

  10. Okay, then you might have a chance if you can get GMP to run on your target…

    Comment by Jonas Finnemann Jensen — February 25, 2010 @ 03:45

  11. Dear Jonas;
    First i need to compile it on the Pc and it will be then on the FPGA so what additional files are required to simpleECDSA to compile it on Ubuntu?
    by the way the xilinx compiler have GMP library but i have not used it yet.
    Dear jonas can i get C code of ECDSA which can be compiled on windows?
    thank you
    welekiros

    Comment by welekiros — February 25, 2010 @ 20:20

  12. Dear admin;
    is it necessary to install libgmp3,limgmp3_dev and essential packages to Ubuntu 9.10?
    thank you
    kind regards

    Comment by welekiros — February 25, 2010 @ 20:42

  13. I’ve never built it on Windows… but you’ll certainly need gmp which can be downloaded from gmplib.org, that is the ONLY extern dependency SimpleECDSA have…

    On linux you can build SimpleECDSA using:
    $gcc -lgmp -o ./SimpleECDSA ./src/*.c
    Where ./src is the source folder of SimpleECDSA…
    You can also choose to use ./configure and make, however, plain compiler commands are probably easier on Windows…

    You can probably find something about installing gmp in its readme file or manual:
    http://gmplib.org/manual-4.3.2/Notes-for-Particular-Systems.html

    I my experience compiling C on Windows is rather difficult… But if you figure out how to build gmp for Windows, and what argument to give your compiler in order to link against gmp, SimpleECDSA should be fairly easy to build…

    Comment by Jonas Finnemann Jensen — February 25, 2010 @ 23:47

  14. Dear Jonas;
    while i use to compile on Linux it gives me the following message: “make[2]*** No rule to make target ‘LICENSE’ needed by ‘all_am’.stop” so what does is it mean?
    thank you

    Comment by welekiros — February 27, 2010 @ 21:07

  15. Hmm… sounds like autotools complains about bad stuff…

    Try this:
    http://jopsen.dk/downloads/SimpleECDSA-plainmakefile.tar.gz

    It’s a plain make file, just run:
    $ make
    Then you should get a binary that can run…

    Comment by Jonas Finnemann Jensen — February 28, 2010 @ 01:59

  16. Dear Jonas;
    sorry for being making you tired of this.
    i am getting this problem and still i am unable to solve this problem. here is it:

    “make all-recursive
    make[1]: Entering directory `/home/student/Desktop/simpleECDSA’
    Making all in src
    make[2]: Entering directory `/home/student/Desktop/simpleECDSA/src’
    gcc -lgmp -o ./SimpleECDSA ./src/*.c
    gcc: ./src/*.c: No such file or directory
    make[2]: *** [build] Error 1
    make[2]: Leaving directory `/home/student/Desktop/simpleECDSA/src’
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/home/student/Desktop/simpleECDSA’
    make: *** [all] Error 2″

    thank you

    Comment by welekiros — March 2, 2010 @ 03:40

  17. Hmm… Try typing:
    $ cd /home/student/Desktop/simpleECDSA/
    $ gcc -lgmp -o SimpleECDSA -i src/*.c

    That should do…

    Then test using:
    $ chmod +x SimpleECDSA
    $ ./SimpleECDSA –test

    Comment by Jonas Finnemann Jensen — March 3, 2010 @ 00:23

  18. hello Jonas,
    i am just a beginner….for Linux platform. Will Simple ECDSA work using Mathlab framework? Is there a program written for it? (Also can u tell me how do i install Linux(Ubuntu) on WindowsXp?
    Is Ubuntu a free software?) Is there a java program for Simple ECDSA,can it run on Windows platform?(Do u know sumthin about Java carts?)
    soon reply would be appreciated
    thank you

    Comment by ace1 — April 15, 2010 @ 10:46

  19. @ace1
    SimpleECDSA is an implementation of ECDSA in C programming language. SimpleECDSA is NOT a standard, but a toy implementation of ECDSA for educational purposes. Given your questions I’m not sure you understand that…
    I recommend reading Wikipedia.org/wiki/Ubuntu for general information on what Ubuntu is…
    For how to install Ubuntu on your PC or in a virtual machine under Windows ask on Ubuntuforums.com they are pretty good at helping out…

    Comment by Jonas Finnemann Jensen — April 15, 2010 @ 12:30

  20. hello Jonas,
    thank you for the quick response! I did install the following packages from the terminal(Ubuntu version 8.3):
    libgmp3-dev, build essential packages by using the foll command ->
    $root@desktop/home/kjsce# sudo apt-get install libgmp3-dev
    $root@desktop/home/kjsce# sudo apt-get install build essential

    then after installing packages
    i get these messages->
    $root@desktop/home/kjsce#

    now how i should proceed, given that the folder named SimpleECDSA is stored on the desktop and how do i build the program?
    Also i cant find gcc as the source path anywhere? plz help
    where do i write the cmd->
    $gcc -lgmp -o ./SimpleECDSA ./src/*.c

    Comment by ace1 — April 16, 2010 @ 08:27

  21. $root@desktop/home/kjsce#
    is the command line… where you type commands… Not a message…

    Learn to use a terminal and write a hello world program in C if you haven’t done that before…
    There is plenty of C and terminal tutorials online, just google it…

    You download the archive above, all you need to do is to extract it, open a terminal and navigate to it in the terminal… Then configure it using ./configure and build it using make
    Alternately you can run gcc -lgmp -o ./SimpleECDSA ./src/*.c in the terminal, when you have extracted in the sources and changed directory to these sources…

    By the way, there’s no Ubuntu 8.3 and “build essential” is written with a dash, e.g. “build-essential”…

    Comment by Jonas Finnemann Jensen — April 17, 2010 @ 02:01

  22. hello Jonas,
    i am extremely sorry for interrupting you again.
    i have downloaded the foll: libgmp3c2, libgmp3-dev, build-essential.
    i hav saved the program: Filesystem->home->kjsce->desktop->simpleecdsa-1.0.0
    i tried building the program in terminal:
    kjsce@kjsce-desktop-22:~$ cd Desktop
    kjsce@kjsce-desktop-22:~/Desktop$ cd simpleecdsa-1.0.0
    kjsce@kjsce-desktop-22:~/Desktop/simpleecdsa-1.0.0$ cd src
    kjsce@kjsce-desktop-22:~/Desktop/simpleecdsa-1.0.0/src$ cc *.c

    after compiling, i am gettingfoll errors:

    /tmp/ccmDmahe.o: In function `benchmark’:
    benchmark.c:(.text+0×87): undefined reference to `__gmpz_init’
    … Lots of undefined references (removed by Jonas for readability) …
    test.c:(.text+0xce0): undefined reference to `__gmpz_clear’
    /tmp/ccFgGuQ4.o:test.c:(.text+0xceb): more undefined references to `__gmpz_clear’ follow
    collect2: ld returned 1 exit status
    *—————————————————*
    //Ubuntu version (8.04)
    Will the packages that i hav downloaded satisfy the program?
    and where do i store the packages or how do i retrieve them since i hav downloaded packages from internet?
    Plz help.
    thank you!!!!!!!

    Comment by ace1 — April 17, 2010 @ 03:23

  23. Okay, seems like you’re getting the picture, you only need to link against gmp now… Pass the -lgmp argument to the compiler…

    E.g:
    $ cd Desktop/simpleecdsa-1.0.0
    $ gcc -lgmp src/*.c -o SimpleECDSA
    That should compile it, then don’t forget to give it executable rights by running:
    $ chmod +x SimpleECDSA

    Alternately you can build it using autotools, just write:
    $ cd Desktop/simpleecdsa-1.0.0
    $ ./configure
    $ make
    And you that should be it… This is usually how you compile tarballs you download from random places… :)

    Comment by Jonas Finnemann Jensen — April 17, 2010 @ 03:37

  24. hello Jonas, thank you very much for the quick reply. I hav tried the following steps: and i got these errors>>>.plz help:

    kjsce@kjsce-desktop-22:~$ cd Desktop
    kjsce@kjsce-desktop-22:~/Desktop$ cd simpleecdsa-1.0.0
    kjsce@kjsce-desktop-22:~/Desktop/simpleecdsa-1.0.0$ gcc -lgmp src/*.c -o SimplECDSA
    kjsce@kjsce-desktop-22:~/Desktop/simpleecdsa-1.0.0$ chmod +x SimplECDSA
    kjsce@kjsce-desktop-22:~/Desktop/simpleecdsa-1.0.0$ ./SimplECDSA -test
    ./SimplECDSA: Missing arguments.
    Try ‘./SimplECDSA –help’ for further information.
    kjsce@kjsce-desktop-22:~/Desktop/simpleecdsa-1.0.0$

    Alternately, i tried this command also:

    kjsce@kjsce-desktop-22:~/Desktop/simpleecdsa-1.0.0$ ./configure
    bash: ./configure: /bin/sh^M: bad interpreter: No such file or directory
    kjsce@kjsce-desktop-22:~/Desktop/simpleecdsa-1.0.0$ make
    make: *** No targets specified and no makefile found. Stop.
    kjsce@kjsce-desktop-22:~/Desktop/simpleecdsa-1.0.0$

    Plz help.
    Thanking you, awaiting response.

    Comment by ace1 — April 18, 2010 @ 23:13

  25. i hav downloaded the following packages:

    libgmp3c2, libgmp3-dev & build-essential packages.
    I am unable to get libgmp3 package. So wat should i do?

    Do i need to save the packages into the same folder ie (simpleecdsa-1.0.0) for linking?

    Comment by ace1 — April 18, 2010 @ 23:20

  26. You did compile SimpleECDSA, so no need to try the alternate method…

    try:
    $ ./SimpleECDSA –help
    $ ./SimpleECDSA –test
    Or some of the other arguments. “-test” is not a correct argument, “-t” or “–test” is…

    That’s it… if you want to know how it works I’d recommend Wikipedia and Handbook of Applied Cryptography, which can be found here:
    http://www.cacr.math.uwaterloo.ca/hac/

    Of course you can also read the source…

    Comment by Jonas Finnemann Jensen — April 18, 2010 @ 23:33

  27. hello Jonas, thanks again for the quick reply.
    I’m not able to understand the actual working of the program.

    Please explain conceptually the working of the program and the commands used for it……..
    I’m actually working for it as my college project.
    And I got to show this prototype this week.
    Please help!!!!!!

    I hav tried the following steps:

    kjsce@kjsce-desktop-22:~$ cd desktop
    bash: cd: desktop: No such file or directory
    kjsce@kjsce-desktop-22:~$ cd Desktop
    kjsce@kjsce-desktop-22:~/Desktop$ ./SimplECDSA
    bash: ./SimplECDSA: No such file or directory
    kjsce@kjsce-desktop-22:~/Desktop$ cd simpleecdsa-1.0.0
    kjsce@kjsce-desktop-22:~/Desktop/simpleecdsa-1.0.0$ ./SimplECDSA
    ./SimplECDSA: Missing arguments.
    Try ‘./SimplECDSA –help’ for further information.
    kjsce@kjsce-desktop-22:~/Desktop/simpleecdsa-1.0.0$ ./SimplECDSA –test
    ./SimplECDSA: Missing arguments.
    Try ‘./SimplECDSA –help’ for further information.
    kjsce@kjsce-desktop-22:~/Desktop/simpleecdsa-1.0.0$ ./SimplECDSA –help
    Usage: ./SimplECDSA [options]
    Generate public key, sign and verify messages using the elliptic curve digital signature algorithm.

    Commands:
    -g [key] –generate [key] Generate public key
    -s [key] –sign [key] Sign a message
    –verify [key] Verify signature
    -b [key] –benchmark [i] Run a benchmark
    -t –test Run all tests
    –test-generate Test public key generation
    –test-verify Test signature verification
    –test-compression Test point compression
    –test-numbertheory Test point compression
    –test-self Run self test
    –crack [key] Try to crack a public key
    -v –version Display version information
    -h –help Display help.

    Options:
    -c –curve Curve [0-12], defaults to DEFAULT_CURVE = 3
    -I –input Input file, defaults to stdin
    -O –output Output file, defaults to stdout
    -q –quite Quite mode

    Return values:
    0 Operation performed successfully
    1 Verification or test failed, program ended without failure
    2 File IO failure, see stderr
    3 Out of memory error
    4 Internal inconsistency
    5 Not implemented yet

    SimpleECDSA is a simple implementation of ECDSA, it’s NOT designed to solve security issues. It’s an educational toy, designed to play with performance and implementation issue of ECDSA.
    kjsce@kjsce-desktop-22:~/Desktop/simpleecdsa-1.0.0$ ./SimplECDSA -g
    Private key:
    14
    Public key:
    0250b7d72699e59392753e3bd51be4556d47e8b952
    kjsce@kjsce-desktop-22:~/Desktop/simpleecdsa-1.0.0$ ./SimplECDSA -s
    Private key:
    13
    Message:
    Hi Vijayshree
    Hi
    14

    kjsce@kjsce-desktop-22:~/Desktop/simpleecdsa-1.0.0$ ./SimplECDSA -t

    — Test public key generation —
    Test completed successfully.

    — Test signature verification —
    Test completed successfully.

    — Test algothrim integrity —
    Test completed successfully.

    — Test point compression —
    secp112r1: Ok
    secp128r1: Ok
    secp160k1: Ok
    secp160r1: Ok
    secp160r2: Ok
    secp192k1: Ok
    secp192r1: Ok
    secp224k1: Ok
    secp224r1: Ok
    secp256k1: Ok
    secp256r1: Ok
    secp384r1: Ok
    secp521r1: Ok
    Test completed successfully.

    — Test number theory —
    Modular explonentiation: Ok
    Squaring modulo prime: Ok
    Extended euclidean algorithm: Ok
    Legendre symbol test: Ok
    Number theory tests successfully completed 500 times.

    All Test successfully completed in 1.2300 seconds.
    kjsce@kjsce-desktop-22:~/Desktop/simpleecdsa-1.0.0$ ./SimplECDSA -g
    Private key:
    14
    Public key:
    0250b7d72699e59392753e3bd51be4556d47e8b952
    kjsce@kjsce-desktop-22:~/Desktop/simpleecdsa-1.0.0$ ./SimplECDSA -g -c
    Private key:
    4
    Public key:
    03b2e772a7ea91e88c1d6ea454de57aa19b5258bd1
    kjsce@kjsce-desktop-22:~/Desktop/simpleecdsa-1.0.0$ ./SimplECDSA -g
    Private key:
    4
    Public key:
    03b2e772a7ea91e88c1d6ea454de57aa19b5258bd1
    kjsce@kjsce-desktop-22:~/Desktop/simpleecdsa-1.0.0$ ./SimplECDSA -v
    ./SimplECDSA (SimpleECDSA) 1.0.0
    Copyright (C) 2007 Jonas F. Jensen.
    This is free software. You may redistribute copies of it under the terms of
    the GNU General Public License .
    There is NO WARRANTY, to the extent permitted by law.

    Written by Jonas F. Jensen .
    kjsce@kjsce-desktop-22:~/Desktop/simpleecdsa-1.0.0$ ./SimplECDSA -g
    Private key:
    7
    Public key:
    0270c95c6f287f2a5f9d971ffa82464b5885a9cd7b
    kjsce@kjsce-desktop-22:~/Desktop/simpleecdsa-1.0.0$
    kjsce@kjsce-desktop-22:~/Desktop/simpleecdsa-1.0.0$ ./SimplECDSA –test-generate

    — Test public key generation —
    Test completed successfully.
    kjsce@kjsce-desktop-22:~/Desktop/simpleecdsa-1.0.0$ ./SimplECDSA -I
    ./SimplECDSA: Missing arguments.
    Try ‘./SimplECDSA –help’ for further information.
    kjsce@kjsce-desktop-22:~/Desktop/simpleecdsa-1.0.0$ ./SimplECDSA -g -I
    Private key:
    4
    Public key:
    03b2e772a7ea91e88c1d6ea454de57aa19b5258bd1
    kjsce@kjsce-desktop-22:~/Desktop/simpleecdsa-1.0.0$ ./SimplECDSA -g -O
    Private key:
    4
    Public key:
    03b2e772a7ea91e88c1d6ea454de57aa19b5258bd1
    kjsce@kjsce-desktop-22:~/Desktop/simpleecdsa-1.0.0$ ./SimplECDSA –crack
    Public key:
    5
    WARNING: You are running a brute force attack on the elliptic curve discrete logarithm problem. This might take a minor eternity, press ctrl+c to abort.
    Factors checked: 91100
    kjsce@kjsce-desktop-22:~/Desktop/simpleecdsa-1.0.0$ ./SimplECDSA -g
    Private key:
    4
    Public key:
    03b2e772a7ea91e88c1d6ea454de57aa19b5258bd1
    kjsce@kjsce-desktop-22:~/Desktop/simpleecdsa-1.0.0$ ./SimplECDSA –crack
    Public key:
    4
    WARNING: You are running a brute force attack on the elliptic curve discrete logarithm problem. This might take a minor eternity, press ctrl+c to abort.
    Factors checked: 72258
    kjsce@kjsce-desktop-22:~/Desktop/simpleecdsa-1.0.0$ ./SimplECDSA -g
    Private key:
    4
    Public key:
    03b2e772a7ea91e88c1d6ea454de57aa19b5258bd1
    kjsce@kjsce-desktop-22:~/Desktop/simpleecdsa-1.0.0$ ./SimplECDSA -s
    Private key:
    4
    Message:
    Hi Vijayshree
    hi kiran
    hi rupalika

    –verify

    kjsce@kjsce-desktop-22:~/Desktop/simpleecdsa-1.0.0$ ./SimplECDSA –verify
    Public key:

    kjsce@kjsce-desktop-22:~/Desktop/simpleecdsa-1.0.0$ ./SimplECDSA –verify
    Public key:
    03b2e772a7ea91e88c1d6ea454de57aa19b5258bd1
    Message:
    hi

    kjsce@kjsce-desktop-22:~/Desktop/simpleecdsa-1.0.0$ ./SimplECDSA –verify
    Public key:
    4
    Message:
    Hi Vijayshree
    hi kiran
    hi rupalika

    kjsce@kjsce-desktop-22:~/Desktop/simpleecdsa-1.0.0$
    kjsce@kjsce-desktop-22:~/Desktop/simpleecdsa-1.0.0$

    Comment by ace1 — April 19, 2010 @ 23:51

  28. I honestly don’t remember how it works… I wrote this program as a highschool, 3 years ago… :)
    I suggest you read the source, it has lots of comments…

    But if you don’t use -I and -O parameters to specify input and output file…You will need to type CTRL+D twice inorder to stop typing data in…
    I’d suggest that you learn to use a terminal if you don’t know how to pass arguments to programs.

    Comment by Jonas Finnemann Jensen — April 20, 2010 @ 01:03

  29. Hello Jonas,
    We are very thankful for your patience and support in helping us out with the implementation. Finally, we are through with it. We hope for the future help also!
    ;-)
    Regards,
    ace1 & group

    Comment by ace1 — April 20, 2010 @ 03:17

  30. hello Jonas,
    i have chosen cryptography as the base for my project. i would like to know applications of cryptography. i mean… how can we use the ECDSA algorithms for real world applications?

    Comment by maxtin — August 1, 2010 @ 11:13

  31. @maxtin
    Asymmetric key algorithms, such as ECDSA, are used many in places today. Whenever you need secure communication without use of shared secrets, algorithms such as ECDSA or RSA are used.

    Asymmetric key algorithms are widely used for digital signatures, secure email (GPG) and secure internet (HTTPS).

    Take a look at: http://en.wikipedia.org/wiki/Public-key_cryptography

    Comment by Jonas Finnemann Jensen — August 2, 2010 @ 04:23

  32. thank you Sir..

    Comment by maxtin — August 11, 2010 @ 10:24

  33. Hi Welekiros,

    Were you able to use this code on FPGA? I am planning to implement the same on FPGA, I got it to work on ubuntu using terminal, though I would like to use it on FPGA,as I need to implement Signature generation and verification using ECC. I have the ECC module, but would like to know in case if this code can be helpful rather than re-inventing the wheel.Please let me know.

    Comment by Hetal — October 3, 2010 @ 12:29

  34. Hi,
    I tried to run your code on Windows XP(Turbo C++) but its not working.The program says that it is unable to open the header file “domain_parameters.h” .There are other syntactical errors too.Can you please help?

    Comment by Amrita Datta Gupta — November 20, 2010 @ 21:52

  35. I haven’t used Turbo C++, but it might be possible. Anyway, this is written in C…
    So you might want to try with mingw (a GCC port), if you download CodeBlocks, you’ll also get mingw with it.

    If that doesn’t work, send me an email with more details, maybe I’ll have a clue (you can find my email on the “about page”).

    Comment by Jonas Finnemann Jensen — November 21, 2010 @ 08:36

  36. hai sir, i am doing my final year IT and i am doing my project(MABS IN MOBILE COMPUTING) i need coding for ECDSA in C# in DOTNET with expianation.plz help me for my project

    Comment by james — March 22, 2011 @ 21:27

  37. Hi James,
    There should be a big integer in .Net 4.0, otherwise you can easily find another integer library for .Net…
    I would recommend that you read wikipedia about ECDSA and take a look at Handbook of Applied Cryptography for pseudo code (http://www.cacr.math.uwaterloo.ca/hac/).

    You can also look at my source, an either use that as reference or look at the references it has to Handbook of Applied Cryptography…

    If you have any concrete questions you’re also welcome to contact me… Best of luck with your project…

    By the way, if you decide to release the source for your implementation, feel free to drop a link here, so others interested in it may find it…

    Comment by Jonas Finnemann Jensen — March 23, 2011 @ 00:01

  38. Sir,
    i tried running your code in gcc.but i cudn understand 2 thngs.
    1.the order in which the codes r to b run.as in which file to b run before which one.
    2.mpz_t is giving some errors.does it need a header(mpz_t has bn used in domain_parameters.h and other files too)

    Comment by Prithviraj Gupta — April 6, 2011 @ 12:50

  39. sir,
    the customised headers are more or less working(.h files).but when i tried to run domain_parameters.c the following error resulted.can u pls help!!
    $ gcc domain_parameters.c
    /tmp/ccATeIwp.o:domain_parameters.c:(.text+0x1f): undefined reference to `__imp_
    ___gmpz_init’
    /tmp/ccATeIwp.o:domain_parameters.c:(.text+0x2f): undefined reference to `__imp_
    ___gmpz_init’
    /tmp/ccATeIwp.o:domain_parameters.c:(.text+0x3f): undefined reference to `__imp_
    ___gmpz_init’
    /tmp/ccATeIwp.o:domain_parameters.c:(.text+0×46): undefined reference to `_point
    _init’
    /tmp/ccATeIwp.o:domain_parameters.c:(.text+0x5c): undefined reference to `__imp_
    ___gmpz_init’
    /tmp/ccATeIwp.o:domain_parameters.c:(.text+0x6c): undefined reference to `__imp_
    ___gmpz_init’
    /tmp/ccATeIwp.o:domain_parameters.c:(.text+0xed): undefined reference to `__imp_
    ___gmpz_set_ui’
    /tmp/ccATeIwp.o:domain_parameters.c:(.text+0×104): undefined reference to `__imp
    ____gmpz_set_ui’
    /tmp/ccATeIwp.o:domain_parameters.c:(.text+0x11b): undefined reference to `__imp
    ____gmpz_set_ui’
    /tmp/ccATeIwp.o:domain_parameters.c:(.text+0×139): undefined reference to `_poin
    t_set_ui’
    /tmp/ccATeIwp.o:domain_parameters.c:(.text+0x14e): undefined reference to `__imp
    ____gmpz_set_ui’
    /tmp/ccATeIwp.o:domain_parameters.c:(.text+0×165): undefined reference to `__imp
    ____gmpz_set_ui’
    /tmp/ccATeIwp.o:domain_parameters.c:(.text+0x19e): undefined reference to `__imp
    ____gmpz_set_str’
    /tmp/ccATeIwp.o:domain_parameters.c:(.text+0x1bd): undefined reference to `__imp
    ____gmpz_set_str’
    /tmp/ccATeIwp.o:domain_parameters.c:(.text+0x1dc): undefined reference to `__imp
    ____gmpz_set_str’
    /tmp/ccATeIwp.o:domain_parameters.c:(.text+0x1fa): undefined reference to `_poin
    t_set_hex’
    /tmp/ccATeIwp.o:domain_parameters.c:(.text+0×217): undefined reference to `__imp
    ____gmpz_set_str’
    /tmp/ccATeIwp.o:domain_parameters.c:(.text+0×236): undefined reference to `__imp
    ____gmpz_set_str’
    /tmp/ccATeIwp.o:domain_parameters.c:(.text+0x24e): undefined reference to `__imp
    ____gmpz_clear’
    /tmp/ccATeIwp.o:domain_parameters.c:(.text+0x25e): undefined reference to `__imp
    ____gmpz_clear’
    /tmp/ccATeIwp.o:domain_parameters.c:(.text+0x26e): undefined reference to `__imp
    ____gmpz_clear’
    /tmp/ccATeIwp.o:domain_parameters.c:(.text+0x27e): undefined reference to `_poin
    t_clear’
    /tmp/ccATeIwp.o:domain_parameters.c:(.text+0x28c): undefined reference to `__imp
    ____gmpz_clear’
    /tmp/ccATeIwp.o:domain_parameters.c:(.text+0x29c): undefined reference to `__imp
    ____gmpz_clear’
    /usr/lib/gcc/i686-pc-cygwin/4.3.4/../../../libcygwin.a(libcmain.o):(.text+0xa9):
    undefined reference to `_WinMain@16′
    collect2: ld returned 1 exit status

    Comment by Prithviraj Gupta — April 6, 2011 @ 13:13

  40. @Prithviraj,

    There’s no need to modify the headers…
    SimpleECDSA depends upon GMP, see http://gmplib.org/
    You’ll need to link against this, with:
    $ gcc -lgmp *.c -o SimpleECDSA

    Comment by Jonas Finnemann Jensen — April 6, 2011 @ 23:57

  41. the header problem is to some extent solved but i cant understand the error that arrived which i wrote in my last post.can u pls help!

    Comment by Prithviraj Gupta — April 7, 2011 @ 04:45

  42. You to link against GMP…
    See: http://gmplib.org/manual/Headers-and-Libraries.html#index-Linking-144

    Comment by Jonas Finnemann Jensen — April 7, 2011 @ 05:14

Leave a comment



finpecia tabletten buy Zithromax with a visa free fedex delivery prednisone Accutane without dr order accutane online buy Accutane line Crestor10mg Valtrex effects purchase online prescription Flomax order xenical online with overnight delivery order valtrex online no prescription buy genuine Prednisone online Zithromax Valtrex no prior script purchase cheap Valtrex Valtrex cheap where to purchase Buspar no prescription no fees purchase Orlistat overnight order Prednisone without a rx overnight shipping buy cheap Prednisone no prescription Xenical canadian pharmacy Flomax precio buy Tamsulosin pills in toronto purchase prednisone without a prescription online Flomax toronto cheap Xenical no rx Buy prednisone without a perscription to ship overnight buy Rosuvastatin uk buy Valtrex fed ex purchase Orlistat online without rx buy Orlistat diet pills buy Maxalt where xenical with consult where to buy generic Buspar online without a rx online Valtrex buy equivalent buy Cytotec Proscar online no prescription Valtrex without rx overnight shipping Flomax cheap no rx required canada buy Flomax money buy buying Flomax Prednisone capsule buy cheap Buspar line buy line Orlistat Orlistat buy online in stock Crestor fedex shipping buy finpecia in england canadian pharmacy Cytotec buy finpecia without rx from us pharmacy purchase Valtrex amex online without prescription buy xenical without a prescription overnight shipping prednisone Buy prednisone online overseas buy 200 mcg Cytotec buy Prednisone without rx needed no prescription Buspar with fedex Buspar for sale order valtrex usa How to get perscription of Cytotec buy Amitriptyline online without rx buy Cytotec australia what is Bupropion buy cod valtrex Crestor fedex no prescription Valtrex with free dr consultation buy Buspar tablets without rx order Valtrex overnight order Zovirax for cash on delivery what does Amitriptyline look like finpecia no prior script buy Valtrex in united states online buy cod Zithromax generic Zithromax online want to buy Buspar in usa discount Zithromax prednisone online cash on delivery cheap Crestor usa purchase Crestor no visa without prescription Crestor on line Buspar buy how to buy Valtrex online without a prescription cheap prednisone without a prescription buy cheap Prednisone free fedex purchase rx Crestor without buy Valtrex diet pills buy 40 mg Strattera buy next day Strattera Flomax without rx purchase Flomax without prescription pharmacy Xenical generic Cytotec tablets Cytotec where can i buy Zovirax how to get prescription of xenical buy cheap Premarin line buy Premarin without a rx overnight delivery buy Crestor diet pill purchase Amitriptyline no visa without prescription buy Valtrex in the uk buspar no rx foreign prednisone order on line buy Valtrex once a day buy Orlistat usa Orlistat pharmacy buy Valtrex in the uk Buy prednisone overnight shipping purchase Zithromax overnight Cytotec cheap mexican to buy valtrex order xenical overnight cheap purchase Accutane pay pal without rx buy Buspar free consultation Zithromax 250mg overnight no prescription valtrex buy Premarin online with a debit card Buy Accutane online buy discount proscar purchase Zithromax visa without prescription purchase cheap Xenical where can i purchase xenical no rx how to get a Zithromax rx buy Premarin in india buy cheapest Premarin Flomax uk sales buy Cytotec for women uk buy Valtrex in mo xenical cod next day delivery buy prednisone online without dr approval Valacyclovir effects prednisone shipped COD cheap online pharmacy for prednisone Flomax u.p.s shipping cod achat Orlistat buy prednisone without a prescription buy cheap online pharmacy Crestor safety order xenical Buy xenical without a r x Zithromax order online Purchase Accutane online where can i purchase Crestor no rx purchase Cytotec free consultation purchase Amitriptyline without prescription needed buy cheap Valacyclovir without prescription best buy Orlistat buy xenical no perscription cod Nizoral online order buy discount Flomax where to buy generic Accutane online without a prescription Flomax canada purchasing Flomax online without prescription buy xenical next day delivery buy cheapest Orlistatbuy no prior prescription Orlistat no prescriptions needed for Accutane buy Accutane 40mg valtrex mexico buy Xenical online without rx generic Prednisone online buy Nizoral paypal without rx order Proscar without rx needed buy Orlistat line order Accutane usa