Bitcoin Forum
May 18, 2024, 03:28:56 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Java Bitcoin Utils  (Read 820 times)
Ploo (OP)
Full Member
***
Offline Offline

Activity: 125
Merit: 100


View Profile
December 02, 2012, 11:03:06 PM
 #1

I'm looking for a simple library to handle basic bitcoin related calculations such as
- generating private keys
- calculating public keys
- calculating bitcoin addresses

I'm not looking for any actual bitcoin network interaction. I'm looking at bitcoinj opened but before I slim it down to the classes that are relevant to me I figured I'd ask and see if this is something that's already available.
gweedo
Legendary
*
Offline Offline

Activity: 1498
Merit: 1000


View Profile
December 02, 2012, 11:24:38 PM
 #2

http://pastebin.com/raw.php?i=LuiDSmiN

I wrote this awhile ago, and it does all that, but does require the use of the bouncy castle dependencies
apetersson
Hero Member
*****
Offline Offline

Activity: 668
Merit: 501



View Profile
December 02, 2012, 11:28:41 PM
 #3

bitcoinJ is very simple for that:

Code:
new ECKey().toAddress(NetworkParameters.prodNet())
Mike Hearn
Legendary
*
expert
Offline Offline

Activity: 1526
Merit: 1129


View Profile
December 03, 2012, 12:02:38 AM
 #4

Just take the ECKey, Address and VersionedChecksummedBytes classes from bitcoinj and you have what you need. They don't depend on other parts of the library.
grau
Hero Member
*****
Offline Offline

Activity: 836
Merit: 1021


bits of proof


View Profile WWW
December 03, 2012, 09:28:16 PM
 #5

So you have a choice:

https://github.com/bitsofproof/supernode/blob/master/src/main/java/com/bitsofproof/supernode/core/AddressConverter.java

https://github.com/bitsofproof/supernode/blob/master/src/main/java/com/bitsofproof/supernode/core/ECKeyPair.java
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!