Author

Topic: A lightweight Bitcoin crypto library for Java/Android (Read 3419 times)

Activity: -
Merit: -
Added link to javadocs to the original post (also posted here so you don't have to scroll to find it):

http://x6763.github.com/BitcoinCrypto/doc/index.html
Activity: -
Merit: -
OK, well I'll come back on July 4, then Smiley

OK
Smiley
hero member
Activity: 588
Merit: 500
OK, well I'll come back on July 4, then Smiley
Activity: -
Merit: -
I just wanted to keep the source code private for a little while.  The date is really completely arbitrary, but just a little more memorable (at least to me) than something like June 1st or July 1st.
hero member
Activity: 588
Merit: 500
What's the deal with July 4, 2011?
Activity: -
Merit: -
I wrote a very lightweight Bitcoin crypto library for use with Android or any normal JVM-based project (it does not depend on any Android specific APIs).  I developed it with the Android Development Kit and it tests without problems on the Android emulator.  It compiles for Android versions at least as old as Android 1.5 (API level 3).  The purpose of this library is to remove the need to include the big Bouncy Castle library when only a very tiny portion of Bouncy Castle is needed for working with Bitcoin.  To give an idea of how lightweight it is, when exporting to a jar file containing the compiled code (no docs or source), it is barely over 40KB in size.  It includes a very small amount of code copied from Bouncy Castle.

I am willing to sell copies of this library in binary and/or source code form.  Documentation will be freely viewable and downloadable as soon as I determine where I want to put it online (possibly github, if it can placed there in a way that lets others browse it).  Until I find a public place to put the javadocs, I am willing to email a copy of the javadocs.

The javadocs are viewable here: http://x6763.github.com/BitcoinCrypto/doc/index.html

To purchase a copy of this library's source code, you must agree that you will not publicly share the source code any sooner than July 4, 2011.  You can privately share the source code with other developers working on any of your projects using this library only if they agree not share the source code with anyone else no sooner than July 4, 2011.  The portions of code written by myself will be released into public domain as stated here: http://unlicense.org/UNLICENSE.  The portions of code from the Bouncy Castle library is subject to the Bouncy Castle license as stated here: http://www.bouncycastle.org/licence.html.

The library supports the following features used by Bitcoin:

ECDSA releated features (using the secp256k1 elliptic curve):
* Key pair generation
* Public key generation from private key
* Key serialization/de-serialization - private keys serialize to an array of 32 bytes, as opposed to the bloated storage format used by the official Bitcoin client/OpenSSL
* Signing data
* Verifying signatures

A simple, and consistent API for the following hashes:
* SHA-256
* SHA-1 - included since it's part of the Transaction Script spec
* RIPEMD-160
* Hash160 - provides a simple way to do ripemd160(sha256(data))
* Hash256 - provides a simple way to do sha256(sha256(data))

Prices are negotiable.  PM me if interested.
Jump to: