8

Which programming languages have some ready libraries that support Bitcoin's ECDSA curve - secp256k1?

5

The Bouncy Castle project allows for this and it runs on the Java VM (as was mentioned earlier) as well as the .NET Runtime. An example of using it in C# is shown in this blog post. You can use the .NET version from Visual Basic .NET (as well as any of the other languages on the CLR as well, obviously).

For C++, look at the Crypto++ library which supports secp256k1.

3

The Bouncy Castle library provides support for all languages on the Java VM

This library (and now a derivative library called Spongy Castle) is used in the BitCoinJ library.

The Bouncy Castle library was unfortunately implemented badly in Android which lead to code conflicts that required complex workarounds. Spongy Castle solved those problems making the Java and Android versions work much more cleanly with each other.

There is an interesting discussion on the choice of secp256k1 by Satoshi on the forums.

The languages currently supported by the JVM includes (and I quote):

  • Java
  • Clojure, a functional Lisp dialect
  • Groovy, a scripting language
  • Scala, an object-oriented and functional programming language
  • JavaFX Script, a scripting language targeting the Rich Internet Application domain (discontinued 2010)
  • JRuby, an implementation of Ruby
  • Jython, an implementation of Python
  • Rhino, an implementation of JavaScript
  • AspectJ, an aspect-oriented extension of Java
2

I've modified a library for Google Go to support a few of the Koblitz Curves, including secp256k1. It is available here.

2

There's a dedicated C-library for this curve. This is probably the most widely scrutinized library, and it probably has the best performance. Wrappers for other languages are available.

https://github.com/bitcoin/secp256k1

0

I would highly recommend to use bindings for the official https://github.com/bitcoin/secp256k1 library.

Implementing a secure Elliptic Curve library is not easy, so using a random one is a bad idea

An example of bindings to a different language, here is a rust bindings: https://github.com/rust-bitcoin/rust-secp256k1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.